If you re-dispatch events, you must propertly implement clone().
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Battershall, Jeff Sent: Thursday, July 10, 2008 9:00 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] ComboBox ItemRenderer Custom Events only go to SystemManager - WHY????? Thanks Alex - that does it. I noticed some interesting behavior in all this - if my custom event did not have its own clone method override I'd get a type coercion error when dispatching the custom event from the CB when using event metadata. But now I've got it working right. Jeff -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Thursday, July 10, 2008 12:59 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] ComboBox ItemRenderer Custom Events only go to SystemManager - WHY????? In my coding, the renderers dispatch off their owner, which is the list. The CB simply adds listeners for whatever event it is interested in. Best time to do that is probably the OPEN event. CB currently listens for CHANGE. So in my app there'd only be one level of listening (CB listens to dropdown) since the renderers dispatch off of the dropdown. -Alex ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Battershall, Jeff Sent: Wednesday, July 09, 2008 4:38 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] ComboBox ItemRenderer Custom Events only go to SystemManager - WHY????? Thanks Alex! How do you control what events the CB is listening for from it's list? It would seem there are two levels of listening required herre - one by the List and another by the CB. I'm definitely in search of the best practices way to approach this sort of problem. Jeff -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Wednesday, July 09, 2008 6:00 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] ComboBox ItemRenderer Custom Events only go to SystemManager - WHY????? It wasn't clear whether your renderer was dispatching the event or the entire dropdown. Yes, you may need two levels of owner.. A renderer in the dropdown doesn't have any clue it is working for a combobox and you just have to wire it up correctly. Personally, I'm not a fan of using bubbling to pass events. IMHO, bubbling is designed for cases where you cannot know the relationship (something internal got clicked, scrolled or added). Everything else should be handled without bubbling. The CB listens for events from the dropdown already. If I were doing custom work, any additional event would be dispatched from the dropdown and listened to from the CB. Lots of folks seem to love bubbling, but I think it is a bad practice when you already have a defined relationship. ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Battershall, Jeff Sent: Wednesday, July 09, 2008 11:22 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] ComboBox ItemRenderer Custom Events only go to SystemManager - WHY????? Seriously Alex, I have been tearing my hair out over this. When I trace owner from within my itemRenderer I get "List496" or something like that. If I use owner.dispatchEvent(myCustomEventInstance,true), and listen on the ComboBox, nothing is transmitted. At this point I'm glad I've got something that will work, i.e., using SystemManager, but I want to know if there's something I'm doing wrong that requires this approach, because it seems to break the chain of responsibility. Shouldn't a combo box be able to relay events from its list? Jeff -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Wednesday, July 09, 2008 1:47 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] ComboBox ItemRenderer Custom Events only go to SystemManager - WHY????? Popups have to float over "everything" so they are parented by SM and not the CB or the app. If you dispatch the event off the "owner" it will go to the CB and bubble up from there ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Battershall, Jeff Sent: Wednesday, July 09, 2008 10:23 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] ComboBox ItemRenderer Custom Events only go to SystemManager - WHY????? I've been remiss in addressing my less-than-perfect understanding of Events and event bubbling. My custom itemRenderer needs to fire a custom event. I've spent the last day trying to get it to bubble up from my custom itemRenderer to the ComboBox, but no dice. If I add an eventListener in my ComboBox, it does not receive the event. However when I use systemManager.addEventListener("myCustomEvent",myHandler), suddenly I can receive the event. Is this the expected behavior? Why? Jeff Battershall Application Architect Dow Jones Indexes [EMAIL PROTECTED] <mailto:jeff.battershall%40dowjones.com> (609) 520-5637 (p) (484) 477-9900 (c)