Constructs related to ::tycho::TopLevel


Related class: ::tycho::TopLevel Contents: Procs

Procs

::tkMbLeave {arg}
::tycho::safeUpdate {obj}
Calling update or even "update idletasks" within a method of any Itcl object is very dangerous. The itcl object may be deleted during the update, so when the update returns, you will be trying to execute a method for an object that no longer exists. If you really have to call update inside a method, call this procedure instead, passing it the name of the object you are calling from ($this). If after the call to update the object no longer exists, then a silent error is triggered. This unwinds the calling stack to the top level, preventing this procedure from returning. Note that if this is inside a "catch", then all bets are off. You could get a core dump if after returning from the catch the object no longer exists. The object name given in the argument must be visible at the global scope.

Index of classes



Author: Edward A. Lee
Version: @(#)TopLevel.itcl 1.55 12/16/96
Copyright: (c) 1995-1996 The Regents of the University of California.