Hi. I have an application where almost anything can be invoked by an Action. For actions that can be invoked from multiple places (i.e a toolbar and a menu), I use the same Action object to allow for enabling/disabling the actions.
My question is really about how to develop a strategy for which actions to enable and disable when. Every one of my actions has an update() method that sets it enabled or disabled based on the current state of the application, but I don't want to call update on all my actions every time I do anything. I'd only like to update the ones I need to, but I'm not really sure how to separate them properly. Any thoughts would be appreciated.
Always! Wait. Never. Shut up. Look at this tiny ad.