Huh, I was always under the impression that walk was this way by default.
News to me.. (In fact, I just checked my 2.1.4 executable and it does what
you ask by default by jingo. I keep recompiling 2.1.5 and helping people,
but haven't installed it yet since 2.1.4 works so well and has all my mods. ;)
hmm. maybe it was changed in 2.1.5.. I just have to bite the bullet one
of these days and install it and convert my scripts..
>In addition, I have a question unrelated to scotty. Does anyone know if
>there is a way to put a function on the event queue? I want to be able to
>have a function that takes care of a queue of information. Whenever
>information get's handed to the queue, I want to add an event to the
>'event queue' to run another function that will process whatever is on the
>stack. For example:
>>>proc addQueue item {
>> global theQueue
>>
>> lappend theQueue $item
>> addevent checkQueue
>>}
>
>Thus, when the program gets a chance, it will call the function checkQueue
>to handle any data it contains. I'm sure it can be done, I just don't have
>any idea how.
>
well, fileevent will do this if you change your queue into a channel/descriptor.
(tclx has something similar)
fileevent channelId writable ?script?
Or, you could do this cruedly with a self-referencing after script.
after 300 addQueue
proc addQueue item {
global theQueue
if {[llength $TheQueue] > 1} {
lappend theQueue $item
addevent checkQueue
}
after 300 addQueue
}
A brief man -k shows some possibly useful man pages:
Tk_ServiceEvent Tk_QueueEvent (3) - add events to the Tk event queue and invoke event or idle handlers
Tcl_WatchFile Tcl_CreateEventSource (3) - Event sources, the event notifier, and the event queue
Tcl_WaitForEvent Tcl_CreateEventSource (3) - Event sources, the event notifier, and the event queue
-- !! 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.