Re: itcl/itk 2.2 + scotty 2.1.5 bgerror overlay problem

Juergen Schoenwaelder (schoenw@gaertner.de)
Wed, 23 Jul 1997 21:24:43 +0200

bernd@finow.snafu.de (Bernd Hentig) said:

Bernd> This code will not work reliably with dynamic loadable
Bernd> extensions/procedures because some commands may still be
Bernd> "unknown" at the time of scotty package initialization, so the
Bernd> native bgerror widget from itk is redefined here. To resolve
Bernd> this problem, I suggest to preload any unknown commands before
Bernd> querying their existence:

Bernd> catch {auto_load bgerror}
Bernd> if {[info commands bgerror] == ""} {
Bernd> proc bgerror {msg} {
Bernd> global errorInfo
Bernd> puts stderr $errorInfo
Bernd> }
Bernd> }

Bernd> Perhaps you may incorporate this fix into scotty 2.2.x ?

This looks like a reasonable suggestion. I however changed the
line
catch {auto_load bgerror}
to
catch {bgerror}

because auto_load is not an officially documented feature. This change
will also make sure that it works regardless what the unknown
procedure does to define commands dynamically.
Juergen

-- 
Juergen Schoenwaelder <jschon@research.bell-labs.com>   Tel. +1 908  (gone)
Lucent Technologies, Bell Laboratories, Room 2B-422,    Fax. +1 908 582 5809
600 Mountain Avenue, Murray Hill, NJ 07974
--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.