El_Frito Posted May 31, 2008 Report Posted May 31, 2008 I'm creating an application which has a relatively small main screen and switches between recording, playback, and several monitoring modes. My approach was to create a sub panel and swap out the front panels of several sub vis running in parallel. I've got an event structure in the main vi that will pass user events to the sub vi event structures to let them know when they're being displayed. Every sub vi event structure uses the same user event registration. This works well... 95% of the time. Once in a while (I haven't found any consistencies, yet) a user event does not get handled. For instance, when the user clicks on the "New Recording" button on the main panel, the main panel's event structure generates a user event that should inform the 'new recording' sub vi to pop up the recording wizard. Once in a while.. no wizard. Another example (a more serious one) is when the "Exit" button is pressed, one of the sub vis will not exit. The particular vi which does not exit is not consistent--sometimes its the 'new recording' sub vi, sometimes its the 'status monitor' sub vi, and so on. I've dropped in debugging scenarios which should alert me if there is an error that could be being dropped, but I haven't found anything so far. Is there something that could cause the user event to not be handled? Thanks Quote
LAVA 1.0 Content Posted May 31, 2008 Report Posted May 31, 2008 QUOTE (El_Frito @ May 30 2008, 12:46 PM) I'm creating an application which has a relatively small main screen and switches between recording, playback, and several monitoring modes. My approach was to create a sub panel and swap out the front panels of several sub vis running in parallel. I've got an event structure in the main vi that will pass user events to the sub vi event structures to let them know when they're being displayed. Every sub vi event structure uses the same user event registration.This works well... 95% of the time. Once in a while (I haven't found any consistencies, yet) a user event does not get handled. For instance, when the user clicks on the "New Recording" button on the main panel, the main panel's event structure generates a user event that should inform the 'new recording' sub vi to pop up the recording wizard. Once in a while.. no wizard. Another example (a more serious one) is when the "Exit" button is pressed, one of the sub vis will not exit. The particular vi which does not exit is not consistent--sometimes its the 'new recording' sub vi, sometimes its the 'status monitor' sub vi, and so on. I've dropped in debugging scenarios which should alert me if there is an error that could be being dropped, but I haven't found anything so far. Is there something that could cause the user event to not be handled? Thanks Post example to get better advice. If you are using Filter Events then an earlier executing filter event could discard the event and therefore the other events will not be fired. Event are handled in the same order in which they are decalred. Just want cmoes to mind. Ben Quote
Ton Plomp Posted May 31, 2008 Report Posted May 31, 2008 QUOTE (El_Frito @ May 30 2008, 05:46 PM) Every sub vi event structure uses the same user event registration. Don't do that!!!! This will fail (as you have noticed) See http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=247057#M247057' target="_blank">here for a thorough explanation of the why. Ton Quote
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.