Home > Archive > Tcl > January 2006 > Create your own event, is it possible ??
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Create your own event, is it possible ??
|
|
|
| Hello,
I would to create my own event, not an based on an user, keyboard or
system event, but on a variable for example :
CreateEvent "ATooBig"
if {A>100} { RaiseEvent "ATooBig"} as we can find in Visual Basic
and then
use this event anywhere to launch a function with bind or something
like that and have :
bind << ATooBig >> {
instruction bloc
}
| |
|
|
| Bryan Oakley 2006-01-25, 7:15 pm |
| RV wrote:
> Hello,
>
> I would to create my own event, not an based on an user, keyboard or
> system event, but on a variable for example :
>
> CreateEvent "ATooBig"
> if {A>100} { RaiseEvent "ATooBig"} as we can find in Visual Basic
>
> and then
> use this event anywhere to launch a function with bind or something
> like that and have :
>
> bind << ATooBig >> {
> instruction bloc
> }
>
You can bind widgets to virtual events, associate virtual events with
real events, and you can generate virtual events. However, to generate a
virtual event you must give it an existing window as its target.
Does that answer your question? Basically, to use a custom event you
need a widget.
| |
|
| thank you,
"Variable trace" seems to be completely what I sought and even much
more.
TCL is very a powerful langage.
|
|
|
|
|