Re: [flexcoders] Type Coercion error in a Popup module
On Tuesday 07 Oct 2008, Pedro Sena wrote: Cairngorm does not work well with modules. AFAIK it works fine, you just have to follow the patten i.e. http://viconflex.blogspot.com/2007/05/can-cairngorm-and-modules-play-nice.html -- Tom Chiverton Helping to centrally drive professional error-free edge-of-your-seat models This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Type Coercion error in a Popup module
Alex impression Sounds like a shared code module problem, check my blog for more details. http://blogs.adobe.com/aharui/ /Alex impression Personally, yeah your analysis sounds about right. How are you loading the module in? Into a child app domain? Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact [EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of hr1ny Sent: 06 October 2008 22:29 To: flexcoders@yahoogroups.com Subject: [flexcoders] Type Coercion error in a Popup module Hi, I have a module that runs inside a popup window. It runs fine the 1st time I run it, but after it runs successfully (and I unload the module), after I create and use a 2nd popup using the same module, it fails with this error: TypeError: Error #1034: Type Coercion failed: cannot convert com.adobe.createmeeting.events::[EMAIL PROTECTED] to com.adobe.createmeeting.events.CreateMeetingEvent. The error occurs while executing a piece of typical Cairngorm-style code: override public function doExecute(event:CairngormEvent):void { var myEvent:CreateMeetingEvent = CreateMeetingEvent(event); If I define the class CreateMeetingEvent and instantiate it in the parent application, then this error does not occur, but I do not want to define it in the parent application, since it does not belong there. My guess is that this has to do with the issue of ApplicationDomains and class loading. Somehow, when I create the 2nd popup with the same module, it is looking for the class definition that belonged to the now-defunct class module. Can anyone suggest what is the best way to fix this? Thanks, Henry
Re: [flexcoders] Type Coercion error in a Popup module
Hi, Cairngorm does not work well with modules. You should take a look at modular ( http://lab.arc90.com/2007/10/modular_1.php). It solve most of the cairngorm problems with modules. I made something similar, but in my case, every module was a TitleWindow. I achieve this with this metatag: [Frame(factoryClass=mx.core.FlexModuleFactory)] Example: [Frame(factoryClass=mx.core.FlexModuleFactory)] public class ReservaWebBaseModule extends TitleWindow implements NetSarChildModule In my specific case, I would like to work with my modules as common TitleWindows, without loosing its module capabilities (load, unload, etc) Hope this helps, Regards, PS On Mon, Oct 6, 2008 at 6:28 PM, hr1ny [EMAIL PROTECTED] wrote: Hi, I have a module that runs inside a popup window. It runs fine the 1st time I run it, but after it runs successfully (and I unload the module), after I create and use a 2nd popup using the same module, it fails with this error: TypeError: Error #1034: Type Coercion failed: cannot convert com.adobe.createmeeting.events::[EMAIL PROTECTED] to com.adobe.createmeeting.events.CreateMeetingEvent. The error occurs while executing a piece of typical Cairngorm-style code: override public function doExecute(event:CairngormEvent):void { var myEvent:CreateMeetingEvent = CreateMeetingEvent(event); If I define the class CreateMeetingEvent and instantiate it in the parent application, then this error does not occur, but I do not want to define it in the parent application, since it does not belong there. My guess is that this has to do with the issue of ApplicationDomains and class loading. Somehow, when I create the 2nd popup with the same module, it is looking for the class definition that belonged to the now-defunct class module. Can anyone suggest what is the best way to fix this? Thanks, Henry -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer * * Net Sar * www.netsar.com.br */