justSteve
|
 |
« on: June 11, 2008, 04:49:48 » |
|
I have an MXML view component implementing a menu where 'upstream functions' like startup and dataprovider population are standard pureMVC operations. The buttons used by this menu are created by a reasonably complex 3rd party .as class that knows nothing of pureMVC. My menu (the pureMVC view component) is correctly injecting the dataProvider and another property required by the button class (labelField) when it declares the button object:
<mx:Canvas id="contentCanvas" top="10" width="200"> <nav:UFMButtonList id="nav" y="200" width="200" maxHeight="800" labelField="@ModuleName" visible="true" showEffect="{myWD}" hideEffect="{myWU}" filters="{dsFilterArray}" openDuration="500" /> </mx:Canvas>
So far, so good. Now I need to modify the button component so that click events (but only _some click events) are bubbled up to the menu component or even the the menu's mediator without incurring the complexity of making the button component a full-fledged pureMVC-ized class. I want to change just enough button code so that, at a given condition internal to the button object, the click event is passed back to the menu component or perhaps, the menu's mediator.
In other words, add a property to the button's declaration that tells the button's internal click hander where to send events that meet my conditions. To my eye, this is the same pattern as sending a 'responder' argument from a proxy to the constructor of a delegate letting the delegate know who gets the results of an asynch operation.
thoughts?
thx --steve...
|