Hello Flexcoders;

 

I’m working on getting on Cairngorm application to load another Cairngorm application. In order that the various singletons don’t conflict, each swf is loaded into a separate application domain.

 

I was surprised to find that a Cairngorm event dispatched from an swf loaded at runtime into its own application domain bubbles to the FrontController instance in the swf file that loaded it. I thought that because the two swf files occupied different application domains, the view hierarchies would not intersect.

 

I guess I was wrong. Is it the case that the application object of an swf file loaded at runtime is contained by the application object of the swf that loaded it? If so, I’m surprised to find that the parentApplication property of the loaded application is null. Where is the reference in the contained application that allows the event to bubble to the containing application?

 

BTW: To work around this difficulty, I’ve change org.nevis.cairngorm.control.FrontController:::executeCommand to:

 

 

                        private function executeCommand( event : CairngormEvent ) : void

                        {

                                    var commandToInitialise : Class = getCommand( event.type );

                                    var commandToExecute : Command = new commandToInitialise();

                                   

                                    event.stopPropagation(); // Add this line

                                    commandToExecute.execute( event );

                        }

 

If anyone thinks this a dangerous change, I’d like to know.

 

Thanks.

Tobias.

Kodak Graphic Communications Canada Company

Tobias Patton | Software Developer | Tel: +1.604.451.2700 ext: 5148 | mailto:[EMAIL PROTECTED] | http://www.creo.com

 

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to