Re: [flexcoders] Listem to an event sent by a DataGrid ItemRenderer
Scott Melby a écrit : In your item renderer, if you have control over the TimerEvent creation, set the bubbles parameter to true. If you do not, you may want to catch the event in the renderer and re-dispatch a new one with bubbles set to true. This will allow your event to bubble out, up the parental chain until it reaches your application. Then all you need to do is register for the event at the Application level. Hello, This is exactly what I was missing. I set the bubbles to true and could catch the event at Application level. Thanks a lot, -- Sébastien
Re: [flexcoders] Listem to an event sent by a DataGrid ItemRenderer
Can you provide a larger code snippet? Try listen to the event on the stage maybe taht will help. Cheers, Claudiu. - Original Message From: Sébastien Tromp [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Saturday, October 18, 2008 1:18:39 PM Subject: [flexcoders] Listem to an event sent by a DataGrid ItemRenderer Hello, I am stuck with an issue whose solution I cannot find on the Internet. I have an application with a DataGrid: mx:DataGrid id=currentConstruc tions mx:columns mx:DataGridColumn dataField=building Type/ mx:DataGridColumn dataField=endDate id=remainingTime itemRenderer= org.feilun. renderer. CountDownRendere r / /mx:columns /mx:DataGrid where CountDownRenderer is a custom ItemRenderer that can dispatch a TimerEvent.TIMER_ COMPLETE event. I would like to listen in my main application (where the DataGrid is defined) to this TIMER_COMPLETE event, but I have not managed to do it. I have tried things like: currentConstruction s.addEventListen er(TimerEvent. TIMER_COMPLETE, handleTimerComplete ); or remainingTime. addEventListener (TimerEvent. TIMER_COMPLETE, handleTimerComplete ); but in neither case is the event caught. Do you have any idea on how this could be achieved? Thanks a lot, Sébastien __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: [flexcoders] Listem to an event sent by a DataGrid ItemRenderer
Where is the Timer control ? Which TimerEvent you are listening to .. Thanks, with Regards, Jitendra Jain From: Sébastien Tromp [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Saturday, 18 October, 2008 3:48:39 PM Subject: [flexcoders] Listem to an event sent by a DataGrid ItemRenderer Hello, I am stuck with an issue whose solution I cannot find on the Internet. I have an application with a DataGrid: mx:DataGrid id=currentConstruc tions mx:columns mx:DataGridColumn dataField=building Type/ mx:DataGridColumn dataField=endDate id=remainingTime itemRenderer= org.feilun. renderer. CountDownRendere r / /mx:columns /mx:DataGrid where CountDownRenderer is a custom ItemRenderer that can dispatch a TimerEvent.TIMER_ COMPLETE event. I would like to listen in my main application (where the DataGrid is defined) to this TIMER_COMPLETE event, but I have not managed to do it. I have tried things like: currentConstruction s.addEventListen er(TimerEvent. TIMER_COMPLETE, handleTimerComplete ); or remainingTime. addEventListener (TimerEvent. TIMER_COMPLETE, handleTimerComplete ); but in neither case is the event caught. Do you have any idea on how this could be achieved? Thanks a lot, Sébastien Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php
Re: [flexcoders] Listem to an event sent by a DataGrid ItemRenderer
In your item renderer, if you have control over the TimerEvent creation, set the bubbles parameter to true. If you do not, you may want to catch the event in the renderer and re-dispatch a new one with bubbles set to true. This will allow your event to bubble out, up the parental chain until it reaches your application. Then all you need to do is register for the event at the Application level. hth Scott --- Scott Melby Founder, Fast Lane Software LLC http://www.fastlanesw.com jitendra jain wrote: Where is the Timer control ? Which TimerEvent you are listening to .. Thanks, with Regards, Jitendra Jain *From:* Sébastien Tromp sebastien.tromp@ gmail..com *To:* [EMAIL PROTECTED] ups.com *Sent:* Saturday, 18 October, 2008 3:48:39 PM *Subject:* [flexcoders] Listem to an event sent by a DataGrid ItemRenderer Hello, I am stuck with an issue whose solution I cannot find on the Internet. I have an application with a DataGrid: mx:DataGrid id=currentConstruc tions mx:columns mx:DataGridColumn dataField=building Type/ mx:DataGridColumn dataField=endDate id=remainingTime itemRenderer= org.feilun. renderer. CountDownRendere r / /mx:columns /mx:DataGrid where CountDownRenderer is a custom ItemRenderer that can dispatch a TimerEvent.TIMER_ COMPLETE event. I would like to listen in my main application (where the DataGrid is defined) to this TIMER_COMPLETE event, but I have not managed to do it. I have tried things like: currentConstruction s.addEventListen er(TimerEvent. TIMER_COMPLETE, handleTimerComplete ); or remainingTime. addEventListener (TimerEvent. TIMER_COMPLETE, handleTimerComplete ); but in neither case is the event caught. Do you have any idea on how this could be achieved? Thanks a lot, Sébastien Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger. yahoo.com/ download. php