Hi AustrianUser,
Your points are well made.
For the purpose of monitoring what those anoying users want, the event structure has been quite usefull to me.
They are the next logical step in the evolution of the LV user interface.
Let me please try to explain why I have welocomed them.
In the old days, I would put booleans controls in a cluster to allow my user to indicate what state they want my system to be in. I would read this array, find the first set boolean and do what needed done.
In this situation, I would have to take up valuable realestate of my top level VI to handle reading the array and writing back any update that are required. The more options in the app, the more space required to handle maintaining the interface.
When control ref's came out, I was able to push all this distracting GUI stuff down into a sub-VI that was able to maintain the display and notify my code of user requests. This help make my "Top-Level" VI's exactly that, Top Level. No confusing details that distract a reader from the programs structure and and organization. The problem that I had with this appraoch was that other developers would have to take the time to read the "VI Info" for the VI that handled the user interface to learn how it worked (you know how people are about reading intructions these days).
But now with the event structure I get the best of both worlds. The code required to poll the user interface now is stuffed neatly into the "event structure" itself. This performs the functions that had been taken care of by my sub-VI (mentioned above). The second advantage is that the event structure is a LV standard! Other developers do not have to read up on my sub-VI to figure out how it works.
Another advantage is...
THe event structure is very flexible. The Sub-VI I mentioned above was rather robust. It would automatically read the labels of the controls in the cluster and when a button was pushed, return the name of the button. This name was then used to control which state of a state machine was entered next. I though is was pretty cool and used the same sub-VI in a number of projects and only had to changes the button names in a strict type def.
As flexible as this Sub-VI was, it only handled booleans. Last week-end I put together an app that not only had to watch a set of booleans but also had to monitor a picture control that was used as part of a custom control.
I right clicked, BOOM, the event structure now supported the picture control clicks!
Next, I do not have to put my booleans in a cluster any more. I can scatter these babies all over the place now.
Enough said,
Ben