01-23-2012 12:51 PM
I have an event structure with a "drag ended" event for my graph. Everytime when the cursors of the graph (2 separate cursors on the graph) is dragged and dropped, the code within the event case will execute.
If the user does two "drag ended" events back to back, and the code inside the event case has not completed after the first event, would the second event be ignored? If so, is there a way to get around this? Actually, I only want the multiple event to occur before the event case is execuate. Is there an easy way to do this? Thanks!
01-23-2012 01:03 PM
@jyang72211 wrote:
I have an event structure with a "drag ended" event for my graph. Everytime when the cursors of the graph (2 separate cursors on the graph) is dragged and dropped, the code within the event case will execute.
If the user does two "drag ended" events back to back, and the code inside the event case has not completed after the first event, would the second event be ignored? If so, is there a way to get around this? Actually, I only want the multiple event to occur before the event case is execuate. Is there an easy way to do this? Thanks!
Use a dynamic event and unregister it when it is no longer useful?
Ben
01-23-2012 01:42 PM
01-23-2012 02:55 PM
Can you elaborate on that? I thought dynamic event is just event trigger inside the software through the generate user event node? How does that relate to actual event generated by user in the UI?
01-23-2012 02:59 PM
it lets you control at run time what widget triggers the event.
Ton taught me I can reregister the event from a constant that never triggers effectively shutting off all new events.
Ben
01-23-2012 03:31 PM
Is it true that when multiple events happen, they are stored in a queue somewhere? If the program is in still running code for the first event, the second, and third event are not lost, right?
01-23-2012 06:33 PM
I would choose "yes" if asked on a test.
As already mentioned above, there is a time stamp in the form of a ms timeer count as to when the event occured and if they are stale (too old) they could be tossed.
Ben
01-24-2012 02:14 AM
Events are queued up, yes. In the event structure you can get the control values of the time. If you use e.g. Local variables or the controls themselves in the structure it'll be the current values. Which is preferrable is depending on the application.
If you want to wait for events to finish you can stors ms counter when finished and ditch events that's too old (before the current event finishes)
/Y
01-24-2012 11:22 AM
How do you ditch an event?
01-24-2012 12:34 PM