pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cynthia Schwartz <djangolog...@gmail.com>
Subject registering actions as event listeners on the app
Date Wed, 29 May 2013 15:27:26 GMT
Awhile back Todd wrote :

Action is a higher level abstraction that at the event handler level.  For
instance, I have things like NewInvoiceAction, DeleteInvoiceAction,
ProvideFeedbackAction, etc.  They each register themselves as event
listeners on the app and maintain an internal state -- thus allowing them
to perform their action at any time without needing to know how they were
triggered.  They also maintain their own enabled/disabled state in a
similar fashion.  Then I wire up my buttons, menus, and keystrokes to my
actions, and my get auto-disabling of those buttons and menu items for free.

Can someone provide an example of them rgister themselves as event
listeners on the app?


View raw message