Home > Tcl Error > Tcl Error Command Bound To Event

Tcl Error Command Bound To Event

In addition, if the old and new focus windows do not share a common parent, "virtual crossing" focus events are sent to the intermediate windows in the hierarchy. Thus Tk::Button->bind(,"Enter"); Binds Enter events to Tk::Button::Enter by default but gets called as $w->Enter so derived class of Button can just define its own Enter method. &EvWref and associated globals and If tag begins with a dot, as in .a.b.c, then it must be the path name for a window; otherwise it may be an arbitrary string. wiki.tcl.tk The (command bound to event) error Updated 2011-06-23 12:19:46 by RLE ▲ IntroeditThis is a quick little note regarding a common problem Tclers may see: Error strings which are blank have a peek here

If script is prefixed with a "+", then it is appended to any existing binding for sequence; otherwise script replaces any existing binding. If the bindings are associated with different tag's, then each of the bindings will be executed, in order. It is also out-of-date in places. Specifying an unknown tag or unknown event, will cause the command to throw an error. http://wiki.tcl.tk/21347

Which is possible as we allow arbitrary tags. The main difference to the event system built into the Tcl/Tk core is that the latter can generate only virtual events, and only for widgets. share|improve this answer answered Mar 22 '12 at 21:46 TrojanName 3,16041731 1 Source to mclistbox is at tcllib.cvs.sourceforge.net/viewvc/tcllib/mclistbox/… –Donal Fellows Mar 23 '12 at 15:45 Also, as far Valid only for events containing a root field. %S The subwindow window identifier from the event, formatted as a hexadecimal number.

This form of pattern matches a KeyPress event for the particular character. Valid only for events containing a subwindow field. %T The type field from the event. So parsing a transition while expecting a node gives a symbol that makes no sense in numerical calculations.Maybe this helps to make ispin work with the actual dot-versions.A workaround could be The most common case where reformatting occurs is for the %A substitution.

If all three arguments are specified, bind will arrange for script (a Tcl script) to be evaluated whenever the event(s) given by sequence occur in the window(s) identified by tag. The continue and break commands may be used inside a binding script to control the processing of matching scripts. Remaining elements are passed as args to the sub at "invoke" time. check my blog Specifying an unknown tag, i.e.

The signature of the command prefix is command tag event details where details contains the argument(s) of the event. If the matching sequences contain more than one event, then tests (c)-(e) are applied in order from the most recent event to the least recent event in the sequences. Widgets may be assigned a private colormap by specifying a -colormap option; the window manager is responsible for installing and uninstalling colormaps as necessary. Keysyms are textual specifications for particular keys on the keyboard; they include all the alphanumeric ASCII characters (e.g. ``a'' is the keysym for the ASCII character ``a''), plus descriptions for non-alphanumeric

Index Nav: [DateIndex] [SubjectIndex] [AuthorIndex] [ThreadIndex] Message Nav: [DatePrev][DateNext] [ThreadPrev][ThreadNext] Other format: [Raw text] RE: tcl/tk error messages From: "Stanley Sutton" To: "Stanley Sutton" http://search.cpan.org/~ni-s/Tk/pod/Tcl-perl.pod MODIFIERS Modifiers consist of any of the following values: Control Mod2, M2 Shift Mod3, M3 Lock Mod4, M4 Button1, B1 Mod5, M5 Button2, B2 Meta, M Button3, B3 Alt Button4, B4 An unbound event is not considered to be an error. Why does MIT have a /8 IPv4 block?

They are also not called synchronously with the invokation of this command, but simply put into the event queue for processing when the system returns to the event loop. navigate here Error: invalid command name "package" 6. If any parser implicitely relies on a certain ordering of the dot-statements, then it now may fail.I did not look very deep in the spin script, but I interpret the error Some of the substitutions are only valid for certain types of events; if they are used for other types of events the value substituted is undefined. %% Replaced with a single

Valid only for events containing an x field. %y The y field from the event. Offline #4 2013-01-16 17:54:51 heinz Member Registered: 2011-04-29 Posts: 6 Re: ispin problem in automata view: tcl/tk-script error Indeed, there seems to be a difference in the format of dot-files produced Most replacements are numbers or well-defined strings such as Above; for these replacements no special formatting is ever necessary. Check This Out Offline #5 2014-02-23 03:06:56 spinroot forum Registered: 2010-11-18 Posts: 568 Website Re: ispin problem in automata view: tcl/tk-script error this long-standing problem has now been fixed, but using a method for

Visibility events are generated whenever a window's obscurity state changes; the state field (%s) specifies the new state. Copyright © 1994-1996 Sun Microsystems, Inc. It's one of those nasty errors in that it doesn't provide the developer any context to explain what in the code is actually triggering it.Lars H: Is this how it appears

Below is a list of all the valid types; where two names appear together, they are synonyms.

For a binding to match a given event, the modifiers in the event must include all of those specified in the event pattern. This guarantees that the string will be passed through the Tcl parser when the binding script is evaluated. If a keysym detail is given, then the type field may be omitted; it will default to KeyPress. Valid only for KeyPress and KeyRelease events. %m The mode field from the event.

For example, will match a sequence of presses of button 1, even though there will be ButtonRelease events (and possibly Motion events) between the ButtonPress events. For Enter, Leave, FocusIn, and FocusOut events, the string will be one of the following: NotifyAncestor NotifyNonlinearVirtual NotifyDetailNone NotifyPointer NotifyInferior NotifyPointerRoot NotifyNonlinear NotifyVirtual For events other than these, the substituted string Valid only for Circulate events. %s The state field from the event. http://colinmeldrum.com/tcl-error/tcl-tk-error.html The third form of pattern is used to specify a user-defined, named virtual event.

Note: giving a specific button number is different than specifying a button modifier; in the first case, it refers to a button being pressed or released, while in the second it Each window has an associated list of tags, and a binding applies to a particular window if its tag is among those specified for the window. The smallest value for which the system will report is defined by the OS. Enter, Leave An Enter event is sent to a window when the pointer enters that window, and a Leave event is sent when the pointer leaves it.

For ButtonPress, ButtonRelease, Enter, KeyPress, KeyRelease, Leave, and Motion events, a decimal string is substituted. In the case of a ButtonPress or ButtonRelease event, it is the number of a button (1-5). However, higher resolution devices may be available in the future. Valid for all event types. %k The keycode field from the event.

The tag argument determines which window(s) the binding applies to. Instead, a new script will be generated by replacing each %, and the character following it, with information from the current event. In all of the cases where a script argument is provided, bind returns an empty string. The following tests are applied, in order, to determine which of several matching sequences is more specific: (a) an event pattern that specifies a specific button or key is more specific

How do I politely decline a research grant? Valid only for Configure events. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. If the event type is KeyPress or KeyRelease, then detail may be specified in the form of an X keysym.

Indicates the new or requested width of the window.