|
And now that you have things bubbling,
keep in mind that you might want to dispatch something other than “click”
because the user can click on all kinds of things in a DataGrid and the click
handler will get it. For example, clicking on the scrollbar buttons, or some
other part of the renderer will generate a click event. Furthermore, unless
GroupsEvent extends MouseEvent, you will not be able to watch for the click
event from the DataGrid via MXML. Thus the following will not work: <mx:DataGrid click=”myClickHandler(event)”
/> It will catch all clicks from anywhere,
and if you send a GroupsEvent you will get a type mismatch. The current recommended approach to
interactive renderers is to use a unique event name, implement
IDropInListItemRenderer and dispatch on the listData.owner. In 2.0.1 we hope
to fix the .owner property of all renderers so you can dispatch on them (it
will be the DataGrid itself), and then you won’t have to worry about
bubbling either. -Alex From: > You can only set 'bubbles' in the constructor. Sorry, I meant set it in your call to the Event constructor, where
'bubbles' is the second parameter, not set it with an assignment statement in
your constructor. You'd call super(type, true); in your constructor. - Gordon From: In my Event constructor I have: public
function GroupsEvent( When I compile, I
get: error 1059:
Property is read-only. Is there a way to
set bubbles=true for a custom event? From: You can only set 'bubbles' in the constructor. - Gordon From: Thanks! I successfully caught the event that my itemrenderer
dispatched, however I need to add some data to the event. In order to do
this, I created a custom event. The problem is that I can't set
bubbles=true from within the custom event, I get a compiler error saying that
bubbles is a read only property. Is there a way to bypass this? From:
SPONSORED LINKS
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ |
- [flexcomponents] Datagrid ItemRenderer Chad Callahan
- [flexcomponents] Re: Datagrid ItemRenderer Michael Labriola
- RE: [flexcomponents] Re: Datagrid ItemRenderer Chad Callahan
- RE: [flexcomponents] Re: Datagrid ItemRender... Gordon Smith
- RE: [flexcomponents] Re: Datagrid ItemRe... Chad Callahan
- RE: [flexcomponents] Re: Datagrid I... Gordon Smith
- RE: [flexcomponents] Re: Datagr... Alex Harui
- [flexcomponents] Re: Datagrid ItemRender... Michael Labriola
- Re: [flexcomponents] Re: Datagrid I... Steve Webster
