itcl/itk 2.2 + scotty 2.1.5 bgerror overlay problem

Bernd Hentig (bernd@finow.snafu.de)
Fri, 11 Jul 1997 12:50:45 +0100 (WET DST)

Hi.
When using scotty 2.1.5 together with itcl/itk2.2 the itk widget "bgerror"
(which is in the auto_load path of itk) will be overlayed by the scotty
bgerror procedure in file init.tcl.
The offending code segement is:

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

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

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

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

-- 
+-----------------------------------------------------------+
|Bernd Hentig		        |email: Bernd.Hentig@guug.de|
|Parkstr. 10			|Fon: +49 3335 3233 0       |
|D-16244 Finowfurt (Germany)    |FAX: +49 3335 3233 1       |
+-----------------------------------------------------------+
--
!! 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.