LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Andromeda

Add specific menu selection events to the Event structure

Status: Declined

Any idea that has received less than 5 kudos within 5 years after posting will be automatically declined.

This is so obvious that it must have been addressed before, so my apologies to those who must have seen this suggestion in the past!

 

The Event structure is only specific down to the "Menu Selection (User)" level. This is certainly useful, particularly if several VIs share common menu items, as this event handler can just call a generic subVI to handle them.

 

In many of my own designs though, some of the Menu events will duplicate the functionality of front panel buttons (for example: a "Do Something" menu selection, plus a "Do Something" button that does the same thing). It would be useful to have a more specific user menu selection event - in this case, one which trapped the "Do Something" menu selection. Ideally, the general "Menu Selection (User)" event should filter out items which already have specific handlers assigned to them.

 

Expanding a bit, it would be useful for this event case to also handle the "Do Something" button press. In LabVIEW 2011, if I add a button handler event to an event case which already handles a user menu selection, I lose the ability to select an "ItemTag" in that event case. So now I have to factor the event handing code into a subVI in order to avoid code duplication, which may be inappropriate granularity for simple handlers.

 

Again, my apologies in advance for suggesting the obvious!

J. Heerema, PhD - LabVIEW specialist
2 Comments
James_McN
Active Participant

I would love to see this!!  Although it could be difficult to implement behind the scenes, I am not sure.

 

Certainly for me I produce a nice event based application and all works.  Think right, time to add a run-time menu, oh now I have to hand multiple events in a single event in the event structure or duplicate code in another state.  I guess the way around this is to use a producer/consumer or MVC model.

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 5 kudos within 5 years after posting will be automatically declined.