Every class in the SDK has an mx_internal static VERSION property.

I don’t know which APIs changed from 3.2 to 3.4 so you could be just getting 
lucky.  Try building the parent app in Flex 4 and you should definitely see 
problems.


On 2/2/10 4:13 PM, "jamesfin" <james.alan.finni...@gmail.com> wrote:








I've moved the loadForCompatibility and the resizing event is now marshalled.

However, the child sub-app is 3.2sdk and the parent is 3.4sdk and nobody is 
complaining with/without the compatibility flag.  It used to though. ;(

Is there a way to show an Alert from within a SWF to show which SDK it is 
leveraging?

I've clear the flash cache with 
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.html
 so I know it isn't locally cached.

http://71.36.29.20:8888/SubAppTestParent.html

Shows the current version with...

loader.trustContent = true;
loader.visible = true;
loader.loadForCompatibility = true;
loader.load("http://71.36.29.20:8888/SubAppTestChild.swf";);

// this is where resize events will return...
loader.loaderInfo.sharedEvents.addEventListener(ResizeEvent.RESIZE_EVENT, 
newText);

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , Alex 
Harui <aha...@...> wrote:
>
> You need to set loadForCompatility=true before the load() in order to force 
> the child into its own applicationdomain and therefore isolate it from the 
> version of the SDK in the parent app.  Doing so will then give the parent and 
> child different versions of ResizeEvent as you would want and expect in 
> version isolation otherwise a  change to ResizeEvent could cause a failure in 
> the child app.  The correct technique is to marshal all events going between 
> applicationdomains.
>
> If you don't set loadForCompatibility=true before the load() and the child is 
> truly on a different version of the SDK, you should see verify errors.  If 
> both parent and child are on the same SDK, it will work, but as soon as the 
> parent gets a newer SDK, you will start to see verify errors.
>
> You could also set the source property instead of calling load and then order 
> wouldn't matter.
>
>
> On 2/2/10 12:11 PM, "jamesfin" <james.alan.finni...@...> wrote:
>
>
>
>
>
>
> I didn't see that small note to move the loadForCompatibility before the 
> load.  Now that I have done that, I get this error when sending the test 
> event message.  However, if I comment out the loadForCompatibility flag, the 
> child swf still loads fine (with a different SDK) and everything works.  Not 
> sure I understand why the loadForCompatibility is needed UNLESS it is purely 
> for SWF's loaded from a different domain then the parent.
>
> TypeError: Error #1034: Type Coercion failed: cannot convert 
> resizeev...@2c66aeb1 to ResizeEvent.
> at 
> SubAppTestParent/newText()[/Users/jfinnigan/Documents/android/SubAppTestParent/src/SubAppTestParent.mxml:36]
> at flash.events::EventDispatcher/dispatchEventFunction()
> at flash.events::EventDispatcher/dispatchEvent()
> at 
> TestView/sendParent()[/Users/jfinnigan/Documents/android/SubAppTestChild/src/TestView.mxml:21]
> at 
> TestView/___TestView_Button1_click()[/Users/jfinnigan/Documents/android/SubAppTestChild/src/TestView.mxml:33]
>
> --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>  
> <mailto:flexcoders%40yahoogroups.com> , Alex Harui <aharui@> wrote:
> >
> > The rules are that each sub-app must load its own RSLs.  I'm still 
> > suspicious that you have the load call before setting loadForCompatiblity
> >
> >
> > On 2/2/10 10:41 AM, "jamesfin" <james.alan.finnigan@> wrote:
> >
> >
> >
> >
> >
> >
> >
> >
> > Forgot to include the error.  This error only appears if I have 
> > framework.swc being used via RSL in the child subapplication.
> >
> > TypeError: Error #1009: Cannot access a property or method of a null object 
> > reference.
> > at 
> > mx.managers::SystemManager/preloader_rslCompleteHandler()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\managers\SystemManager.as:3147]
> > at flash.events::EventDispatcher/dispatchEventFunction()
> > at flash.events::EventDispatcher/dispatchEvent()
> > at 
> > mx.preloaders::Preloader/http://www.adobe.com/2006/flex/mx/internal::rslCompleteHandler()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\preloaders\Preloader.as:335]
> > at 
> > mx.core::RSLListLoader/listCompleteHandler()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\RSLListLoader.as:238]
> > at 
> > mx.core::RSLItem/itemCompleteHandler()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\RSLItem.as:233]
> > at 
> > mx.core::CrossDomainRSLItem/loadBytesCompleteHandler()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\CrossDomainRSLItem.as:396]
> >
> > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>  
> > <mailto:flexcoders%40yahoogroups.com>  
> > <mailto:flexcoders%40yahoogroups.com> , "jamesfin" <james.alan.finnigan@> 
> > wrote:
> > >
> > > For any Multi-Versioned SubApplication, what are the hard and fast rules 
> > > about using RSL's?
> > >
> > > I tried making the parent (3.4sdk) and child subapplication (3.2sdk) both 
> > > use RSL's but it fails miserably which doesn't surprise me considering 
> > > the complexity of what's going on already.
> > >
> > > However, if the parent alone has RSL's enabled, all is well. ;)
> > >
> > >
> > > So, what are the guidelines.
> > >
> > > i.e. Can never use RSL's on subapplications?
> > >
> >
> >
> >
> >
> >
> >
> > --
> > Alex Harui
> > Flex SDK Team
> > Adobe System, Inc.
> > http://blogs.adobe.com/aharui
> >
>
>
>
>
>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe System, Inc.
> http://blogs.adobe.com/aharui
>






--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui

Reply via email to