comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Re: Q: synchronizing widget events

Re: Q: synchronizing widget events
type: item
description: In article <3kn33q$jiq@ncar.ucar.edu> zender@sage.cgd.ucar.edu (Charlie Zender) writes: > i've got a widget program and i am starting to implement a kind > of macro capability where one button will generate a pre-programmed > sequence of events (with widget_control,send_event=...) > to send off to the other buttons. i've got it working so that the > events are all sent and control is returned to the user when the > macro finishes playing. but there's a sequencing problem. > > i may send the events in the order a,b,c,... but the events are > getting permuted in order by the time they execute. this is a problem > because these are non-commutative operations, and the outcome of event > b will be incorrect if event a hasn't finished yet. i think this is > what's happening. is there a way of running the event managers in > a synchronous mode so that the order the events is processed in is > determinate? I frequently "type ahead" clicking on several widgets and typing stuff while some of my slower widgets execute something. The event managers sole task is to pass out events to widgets in the order they were received. Barring a bug in the manager, they cannot get out of sequence unless one of your widgets clears the "event stack". > i'm not sure it's relevent but i'm sending events to two different > event managers. would it help if i moved all the pertinent widgets > to the same event manager? You have to keep them under one manager in order to keep synchronization. You could implement a brut force synchronization but, putting them all under a single root would be the easiest solution and should not be difficult to do. Best of luck, -- Joseph M. Zawodny (KO4LW) NASA Langley Research Center Internet: j.m.zawodny@larc.nasa.gov MS-475, Hampton VA, 23681-0001 TCP/IP: ko4lw@ko4lw.ampr.org Packet: ko4lw@n4hog.va.usa.na
creator: zawodny
date: 1995-03-22T13:18:01-00:00