Class ::tycho::Object


Source File - Contents: destructor - public method - protected method
This is the base class for Tycho objects that are neither windows nor widgets. It provides a set of useful methods.

Destructor

destructor
Destruction will succeed only if we are not within a safeEval call. If we are, then destruction is canceled with a silent error, and scheduled to be attempted again after 1 second.

Public constructs

Public Method

hyperJump file {point {}}
Open a file and go to its internal point identified by name. If the filename is the empty string, do nothing. Otherwise, the file is opened with ::tycho::File::openContext, which will choose an editor based on the filename extension. Invoke seeFragment to view the specified point within that file. The format for the point argument depends on the type of file being opened. For HTML files, it will normally be the name of an anchor in the file. For text files, it will normally be either "{line linenumber}" or "{range start end}", where start and end have the form linenumber.characternumber.

Protected constructs

Protected Method

safeEval args
Prevent destruction of this object while evaluating the arguments. Destruction will be cancelled by invoking a silent error, and will be scheduled for another attempt in the future.

This method is a workaround for a defect in Itcl. If "update", "update idletasks", or "tkwait" is called directly or indirectly from within an Itcl method, and during the update the Itcl object is destroyed, then when update returns, you may get a catastrophic failure of the application (a core dump).

Index of classes



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