lraynal Posted February 6, 2008 Report Share Posted February 6, 2008 Dear all LAVA members, I need to be able to close a dialog panel with the panel close event at two different places in my diagram. And this is not working for the second event structure. Does anybody has a clue on what to do to solve this ? or is it not possible to have the same event twice ? For the one who would like to try, here is the code in 8.5 Download File:post-6600-1202222751.vi Thanks for your precious help ! Laurent Quote Link to comment
LAVA 1.0 Content Posted February 6, 2008 Report Share Posted February 6, 2008 QUOTE(lraynal @ Feb 5 2008, 09:47 AM) Dear all LAVA members,I need to be able to close a dialog panel with the panel close event at two different places in my diagram. And this is not working for the second event structure. Does anybody has a clue on what to do to solve this ? or is it not possible to have the same event twice ? For the one who would like to try, here is the code in 8.5 Download File:post-6600-1202222751.vi Thanks for your precious help ! Laurent I believe it is possible to have two events structures registered for the same eventbut there are complications. 1) The events execute in the order they were registered. 2) If a filter events (like what you are using) discards an event, it is discarded and the second and subsequent events never see the event. Please feel free to correct me if I am wrong on the above. Ben Quote Link to comment
Ton Plomp Posted February 6, 2008 Report Share Posted February 6, 2008 QUOTE(neB @ Feb 5 2008, 03:57 PM) 2) If a filter events (like what you are using) discards an event, it is discarded and the second and subsequent events never see the event. Ditto To address the points of AQ, I ran the following code, it shows that only one of the two event cases will run(ever) http://lavag.org/old_files/monthly_02_2008/post-2399-1202224739.png' target="_blank"> Ton Quote Link to comment
Aristos Queue Posted February 6, 2008 Report Share Posted February 6, 2008 Every event structure that is registered to handle an event must have the chance to handle the event before the next event can be processed. In your case, you have two event structures handling "Close Panel?". BOTH of these event structures must have a chance to execute before any further events will be processed. LV's event queue is simply waiting for the other event structure to have a chance to run. This is true even of filter events. You should never ever ever ever except when you really know what you're doing have two event structures handling the same event in the same block diagram, and you should avoid having two event structures on the same block diagram at all. (The following may be wrong, but I think it is correct. Someone should double check documentation and/or test this...) In the case of filter events, the "discard" output of all handlers are or'd together to decide whether or not the event actually gets filtered. If any single handler returns TRUE then the event will be filtered. Quote Link to comment
lraynal Posted February 6, 2008 Author Report Share Posted February 6, 2008 Well, looks like I tryed something not very pretty... Thanks for the advices, I will discard right away my second Event structure and find an other way to do it (less easy sadly !) Laurent Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.