Jump to content

Close Panel event called twice !


Recommended Posts

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 ?

post-6600-1202222695.png?width=400

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

Link to comment

QUOTE(lraynal @ Feb 5 2008, 09:47 AM)

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

Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.