05-14-2010 01:34 PM
Hi All,
Been working on a user interface using an event structure design pattern to respond to button presses.
The interface got quite large and I decided to organize the buttons into groups and put them on different tabs (to group the functionality).
However when I put a case statement around the event structure to seperate the code on the diagram too I was not able to switch tabs and the interface gets stuck.
Example attached.
I could put all the button events from different tabs into one event structure but thought this might get very large and unreadable. Is there a standard design pattern that addresses this problem?
Many thanks.
Mark.
Solved! Go to Solution.
05-14-2010 01:54 PM
Medwar19 wrote:Hi All,
Been working on a user interface using an event structure design pattern to respond to button presses.
The interface got quite large and I decided to organize the buttons into groups and put them on different tabs (to group the functionality).
However when I put a case statement around the event structure to seperate the code on the diagram too I was not able to switch tabs and the interface gets stuck.
Example attached.
I could put all the button events from different tabs into one event structure but thought this might get very large and unreadable. Is there a standard design pattern that addresses this problem?
Many thanks.
Mark.
Standard?
If you tabs equate to states then the top level get set up to call a sub-VI that is responcible for that state.
Then inside the sub-VI handling that state I use Dynamic Event registration to set up the events that I have to service while in that state.
This is what one of those sub-VI can look like.
Which makes it very clearn what we are handling in thois mode of operation.
Ton wrote a Nugget on Dynamic Event Registration that can be found here.
Ben