I’m sure most of us are familiar with the trick of adding a Show action to a button widget onClick event, and rather than applying the Bring to Front to that event, applying it to the onShow event of the widget being shown.
This reduces duplication and an all round maintenance nightmare when dealing with more complex interactions.
Now, I’ve run into a problem with this technique when animating a move action of a menu panel.
It works fine when we show the menu panel - we can add the Show Widget action to the onClick of any number of widgets, and then create the Move action on the menu widget.
The issue arises when trying to hide the menu. If I set up a Hide Widget action, it does just that - hides the widget, but I don’t want to hide it straight away - I want to animate the move first. As a result I’m repeating a number of actions in 5 or 6 locations, creating said maintenance nightmare…
Does anyone have any clever tricks for getting round this one?? I’d be much appreciative of any ideas…
What would be really useful is being able to set up a custom event - much like a raised event… but no luck so far with using masters to achieve this. Perhaps this is a feature request!
Cheers,
Stu