|
|
|
[
Permlink
| « Hide
]
JIRA Migration Admin - [05/12/07 05:13 PM ]
Move from BugDB issue number 204336
Milestone ID = null
Milestone = null Build ID = 25424 Build = 167660_flex Fix Build ID = null Fix Build = null [tan 4/29/07] Entered Bug. I tested this bug in Flex 2.0, 2.01 and mainline build 167660. It does not reproduce in 2.0, but, it does repro in 2.01 and our mainline build 167660, so I have marked this as an injection.
I have attached the bugfiles and retested them on build 171415. This still reproduces.
Reproed in 171415. Sending for Internal Review
The implementation class is null for the two other loaded instances of the alert swf. This has to do with some issue of swfloader and ApplicationDomains.
This is basically a fact of life; a limitation relating to ApplicationDomains and Singletons. But there are workarounds. The problem is that when singletons like PopUpManager are created, they are associated with a particular ApplicationDomain. In the sample, they are getting associated with the ApplicationDomain of the first loaded SWF. As a result, they are inaccessible from other application domains...and the swfs in other tabs are loaded into other application domains. One simple workaround for this problem is just to include a reference to the PopupManager class in the parent application: private var popupManager:PopUpManager; This will result in the singleton PopUpManager getting created in the parent application domain, which is fine because it will be accessible from the child applicationDomains of the loaded SWFs. An alternative workaround, at least for this simple case, would be to create a separate application domain for loading all of the child SWFs: var childAppDomain:ApplicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); and then make sure this application domain is used by all the SWFLoaders(): newSWFLoader.loaderContext = new LoaderContext(false,childAppDomain); Putting all the child SWFs in the same application domain may have drawbacks in terms of unloading to free up resources (i.e., I think they can't be unloaded separately). But my understanding of this is limited... Apart from official flex documentation, Alex's presentation on modules is a good source of information on this problem: http://blogs.adobe.com/aharui/2007/03/modules.html Closing... the proposed workaround (private var popupManager:PopUpManager;) is simple and seems to do the trick.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||