Something which I have found annoying over the years is the fact that ALL user menu selections trigger the same event.
I often lay out a nice event structure for UI handling with functions arranged nicely within the event structure and then have to start messing around with strings and Tags in one big case structure in my event structure in order to be able to find out what just happened on the menu and act accordingly. Worst part is when a Tag changes for the menu for whatever reason. It's a round of debugging I'd rather not have to do with my applications.
This would be nice
In the picture above the event structure frame and the menu item are hard-linked. No spelling mistake can lead to a bug here!
Instead of this
In the picture above a spelling mistake on the case structure (or a change in TAG string) can lead to menu items not being acted upon.
Why can't we have a User Event for any given User Menu entry? We could still use Tags and so on but have an additional field for a User Event (Data type always boolean?) which will trigger when the particular menu selection is made. It would be up to the user to register for the event and wire it up to the event structure for it to become "live". Default behaviour would therefore be the exact same as now.
Of course we only have statically-created menu items available like this for the event handler, but this already gives us easier handling of top-level UI menus. Run-time created menus should also have events, but it's up to the user as to how to use these. Either way, the original "one size fits all" menu event should also be fired (can be used for debugging amongst other things) so if it's not feacible to bind the event, the user can revert to the "old school" way of doing things.
The picture above shown all three user-events in a single event structure frame which doesn't really do the idea justice but the idea would be to have an event frame dedicated to a single event.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea that has received less than 4 kudos within 4 years after posting will be automatically declined.