Are you dispatching the same instance a second time? If so, ensure you implement the clone() method on your event.
Alistair -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Giles Roadnight Sent: 19 December 2007 15:02 To: flexcoders@yahoogroups.com Subject: [flexcoders] Odd Cairngorm Event error Hi All I'm setting up a session timeout handling system. The way it is suppsoed to work is that when a call to the back end fails a SessionTimeOutEvent is dispatched with the orignal event as a property (e.g. listUsers event). SessionTimeOutCommand will then popup the login dialogue with a message and when you've logged in it will re-dispatch the original event and you'll be back to where you would have been if your session hadn't timed out. This all works fine except if 2 events fail at the same time. I have set up an array where lost events (listUserEvent, listRolesEvent for example) are stored and then after a successful login are dispatched. However the second SessionTimeOutEvent that is dispatched causes an error: TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::[EMAIL PROTECTED] to com.adobe.cairngorm.control.CairngormEvent. When I debug it the event is a SessionTimeOutEvent (extends cairngorm event) and the first SessionTimeOut Event went through no problem at all. The only thing that I think this could be is somethign to do with the fact that 2 of these are being dispatched at exactly the same time. There is no wait for the back end between the 2 calls to the same Command. I assume that each of these 2 events will generate a new instance of the SessionTimeOutCommand? Perhaps the first one hasn't died yet or somethign along those lines. Can anyone help? Hope I've been clear enough. Giles. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links