[flexcoders] Re: Errors from generated MXML code from module
This was the problem Alex!!! When I used an older version of a swc, everything worked fine. Thank you for your time and knowledge!!! So now I wonder, how can you determine what SDK version any particular swc is created with? If I am stuck in a 3.2 world, and grab a 4.x swc but don't know what version it was compiled with, the compiler won't help me out by telling me it is potentially incompatible. Argg --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Try a brand new project w/o any third-party libraries. It may not help to just recompile third-party libraries if those libraries reference Flex 4 versions of classes and interfaces. You have to make sure there aren't any references to Flex 4 (or even 3.3 and later) in the libraries you are using. On 5/18/10 7:08 PM, jmbo...@... jim_bo...@... wrote: Good point. With Flex 4 out and us still using Flex 3.2,we will need to be on the lookout for inconsistencies. I recompiled several swfs locally using 3.2 to ensure this wasn't the problem. I probably omitted important information. I was compiling a swf file that inherited from Application. Because we are really treating them as Modules, I changed the base class to Module from Application. When I change it back to Application, everything compiles. So, it apparently has to do with trying to compile stand-alone Modules using FB3 and Maven. I tried hard to get the org.sonatype.flexmojos to compile my code when I inherited from Module, but no luck. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: If you have a library/swc in the library-path that is based on code newer than 3.2, that would cause this problem. On 5/18/10 2:23 PM, jmboone@ jim_boone@ wrote: Hummm, I don't know how that would be. This happens within Eclipse, and when I compile using Maven from the command line using version 3.2 of the compiler. I have verified that the compiler version is the same across all my projects. I get the same error if I add a Module to my project that does nothing. I don't get the error in any of my other similar projectsI hate software some days. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Sounds like the compiler is not compatible with the SWCs you are compiling against. On 5/18/10 12:42 PM, jmboone@ jim_boone@ wrote: Hi, I have am trying to compile one of my modules but I am getting the errors shown below. This is in generated code and I am not certain what it is trying to tell me. Has anyone see this before? Thanks! -- Jim [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method get preloadedRSLs in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleF actory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowInsecureDomain in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModul eFactory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowDomain in names pace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleFactory .public class _PharmacySpendApp_mx_core_FlexModuleFactory -- 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
[flexcoders] Errors from generated MXML code from module
Hi, I have am trying to compile one of my modules but I am getting the errors shown below. This is in generated code and I am not certain what it is trying to tell me. Has anyone see this before? Thanks! -- Jim [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method get preloadedRSLs in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleF actory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowInsecureDomain in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModul eFactory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowDomain in names pace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleFactory .public class _PharmacySpendApp_mx_core_FlexModuleFactory
[flexcoders] Re: Errors from generated MXML code from module
Hummm, I don't know how that would be. This happens within Eclipse, and when I compile using Maven from the command line using version 3.2 of the compiler. I have verified that the compiler version is the same across all my projects. I get the same error if I add a Module to my project that does nothing. I don't get the error in any of my other similar projectsI hate software some days. --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Sounds like the compiler is not compatible with the SWCs you are compiling against. On 5/18/10 12:42 PM, jmbo...@... jim_bo...@... wrote: Hi, I have am trying to compile one of my modules but I am getting the errors shown below. This is in generated code and I am not certain what it is trying to tell me. Has anyone see this before? Thanks! -- Jim [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method get preloadedRSLs in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleF actory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowInsecureDomain in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModul eFactory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowDomain in names pace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleFactory .public class _PharmacySpendApp_mx_core_FlexModuleFactory -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: Errors from generated MXML code from module
Good point. With Flex 4 out and us still using Flex 3.2,we will need to be on the lookout for inconsistencies. I recompiled several swfs locally using 3.2 to ensure this wasn't the problem. I probably omitted important information. I was compiling a swf file that inherited from Application. Because we are really treating them as Modules, I changed the base class to Module from Application. When I change it back to Application, everything compiles. So, it apparently has to do with trying to compile stand-alone Modules using FB3 and Maven. I tried hard to get the org.sonatype.flexmojos to compile my code when I inherited from Module, but no luck. --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: If you have a library/swc in the library-path that is based on code newer than 3.2, that would cause this problem. On 5/18/10 2:23 PM, jmbo...@... jim_bo...@... wrote: Hummm, I don't know how that would be. This happens within Eclipse, and when I compile using Maven from the command line using version 3.2 of the compiler. I have verified that the compiler version is the same across all my projects. I get the same error if I add a Module to my project that does nothing. I don't get the error in any of my other similar projectsI hate software some days. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Sounds like the compiler is not compatible with the SWCs you are compiling against. On 5/18/10 12:42 PM, jmboone@ jim_boone@ wrote: Hi, I have am trying to compile one of my modules but I am getting the errors shown below. This is in generated code and I am not certain what it is trying to tell me. Has anyone see this before? Thanks! -- Jim [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method get preloadedRSLs in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleF actory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowInsecureDomain in namespace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModul eFactory.public class _PharmacySpendApp_mx_core_FlexModuleFactory [ERROR] _PharmacySpendApp_mx_core_FlexModuleFactory.as:[13,14] Interface method allowDomain in names pace mx.core:IFlexModuleFactory not implemented by class _PharmacySpendApp_mx_core_FlexModuleFactory .public class _PharmacySpendApp_mx_core_FlexModuleFactory -- 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
[flexcoders] Re: Strange Behavior When Loading Sub Application
Alex, Your suggestion will work and in fact, that is the way we were doing it. Unfortunately, we needed to create a Robotlegs context so that we can listen for ADD_TO_STAGE events and allow it to automatically mediator our view components (see below). That is why I added the sub-app as a child later. Any other ideas how to make the current code work? // Inject dependencies into the module and initiate the context since autoload is set var subApp:IModule = event.moduleApp; injector.injectInto(subApp); // Make sure the content fills the page var subAppComponent:SubAppBase = SubAppBase(subApp); subAppComponent.percentHeight = 100; subAppComponent.percentWidth = 100; /* Add to contentViewStack here based upon position Simply add as a child to the stub canvas that already exists for the module */ var index:int = _moduleArray.getItemIndex(swf); var canvas:Canvas = Canvas(contentViewStack.getChildAt(index)); canvas.addChild(subAppComponent); --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Try adding the SWFLoader to the canvas before you load it. On 5/12/10 12:40 PM, jmbo...@... jim_bo...@... wrote: Hi, I am experiencing an odd problem and I hope someone knows why. I am loading a sub-application using SWFLoader. I listen for the Event.COMPLETE command. Once the swf is loaded, I then add a listener to the SystemManager for the swf and listen for the FlexEvent.APPLICATION_COMPLETE event. At that point, I add the application as a child to a Canvas that exists in a view stack (see code below). This is great, the content loads, but it doesn't seem to load correctly. The legends in my charts are not oriented the way they should be and whenever I roll over an item with a tooltip, I get errors like the following error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.managers::SystemManager/get toolTipChildren()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:1178] at mx.charts.chartClasses::ChartBase/updateDataTipToMatchHitSet()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\ChartBase.as:3030] Does anyone have any clue what is going on?? Thanks, Jim !! snippet where swf is loaded .. var loader:SWFLoader = null; if (content.contentType == ContentData.SWF) { var uri:String = content.contentUri; var loaderContext:LoaderContext = new LoaderContext(); loaderContext.applicationDomain = ApplicationDomain.currentDomain; loaderContext.securityDomain = SecurityDomain.currentDomain; /* Create the swf loader and add it as a child to a canvas * so that it will have a place to display on the display list */ loader = new SWFLoader(); loader.scaleContent = true; loader.loaderContext = loaderContext; loader.addEventListener(Event.COMPLETE, onLoadingComplete); loader.addEventListener(IOErrorEvent.IO_ERROR, onModuleLoadError); loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onModuleLoadError); loader.load(uri); . private function onLoadingComplete(event:Event):void { var swfLoader:SWFLoader = event.currentTarget as SWFLoader; if (swfLoader != null swfLoader.content != null) { /* Create an annoymous listener that dispatches an event when the module is ready to show */ sm.addEventListener(FlexEvent.APPLICATION_COMPLETE, function(flexEvent:FlexEvent):void { var cmEvent:ContentManagementEvent = new ContentManagementEvent(ContentManagementEvent.CONTENT_READY_TO_SHOW); cmEvent.moduleLoader = swfLoader; // Grab a reference to the module application itself if (flexEvent.currentTarget.application is IModule) { cmEvent.moduleApp = flexEvent.currentTarget.application as IModule; } dispatch(cmEvent); }); } } } !! snippet when adding to Canvas if (event.moduleApp != null) { Logger.debug(Setting parentInjector and starting the RL context for : + moduleId); // Make sure the content fills the page var subAppComponent:SubAppBase = SubAppBase(subApp); subAppComponent.percentHeight = 100; subAppComponent.percentWidth = 100; /* Add to contentViewStack here based upon position Simply add as a child to the stub canvas that already exists for the module */ var index:int = _moduleArray.getItemIndex(swf); var canvas:Canvas =
[flexcoders] Re: Strange Behavior When Loading Sub Application
Robotlegs uses the ADD_TO_STAGE to auto-magically mediate view components so dispatching 1 event would not work...I would have to dispatch 1 for each component. I can manually mediate the components, but that is a lot of work for a large app and takes the magic away from RL. I will just have to pursue another strategy. Thanks for your confirmation Alex! Jim --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Flex SWFs must be on-stage in order to load. Are you worried about missing an ADD_TO_STAGE event? Maybe send a fake one on applicationComplete. On 5/13/10 7:51 AM, jmbo...@... jim_bo...@... wrote: Alex, Your suggestion will work and in fact, that is the way we were doing it. Unfortunately, we needed to create a Robotlegs context so that we can listen for ADD_TO_STAGE events and allow it to automatically mediator our view components (see below). That is why I added the sub-app as a child later. Any other ideas how to make the current code work? // Inject dependencies into the module and initiate the context since autoload is set var subApp:IModule = event.moduleApp; injector.injectInto(subApp); // Make sure the content fills the page var subAppComponent:SubAppBase = SubAppBase(subApp); subAppComponent.percentHeight = 100; subAppComponent.percentWidth = 100; /* Add to contentViewStack here based upon position Simply add as a child to the stub canvas that already exists for the module */ var index:int = _moduleArray.getItemIndex(swf); var canvas:Canvas = Canvas(contentViewStack.getChildAt(index)); canvas.addChild(subAppComponent); --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Try adding the SWFLoader to the canvas before you load it. On 5/12/10 12:40 PM, jmboone@ jim_boone@ wrote: Hi, I am experiencing an odd problem and I hope someone knows why. I am loading a sub-application using SWFLoader. I listen for the Event.COMPLETE command. Once the swf is loaded, I then add a listener to the SystemManager for the swf and listen for the FlexEvent.APPLICATION_COMPLETE event. At that point, I add the application as a child to a Canvas that exists in a view stack (see code below). This is great, the content loads, but it doesn't seem to load correctly. The legends in my charts are not oriented the way they should be and whenever I roll over an item with a tooltip, I get errors like the following error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.managers::SystemManager/get toolTipChildren()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:1178] at mx.charts.chartClasses::ChartBase/updateDataTipToMatchHitSet()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\ChartBase.as:3030] Does anyone have any clue what is going on?? Thanks, Jim !! snippet where swf is loaded .. var loader:SWFLoader = null; if (content.contentType == ContentData.SWF) { var uri:String = content.contentUri; var loaderContext:LoaderContext = new LoaderContext(); loaderContext.applicationDomain = ApplicationDomain.currentDomain; loaderContext.securityDomain = SecurityDomain.currentDomain; /* Create the swf loader and add it as a child to a canvas * so that it will have a place to display on the display list */ loader = new SWFLoader(); loader.scaleContent = true; loader.loaderContext = loaderContext; loader.addEventListener(Event.COMPLETE, onLoadingComplete); loader.addEventListener(IOErrorEvent.IO_ERROR, onModuleLoadError); loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onModuleLoadError); loader.load(uri); . private function onLoadingComplete(event:Event):void { var swfLoader:SWFLoader = event.currentTarget as SWFLoader; if (swfLoader != null swfLoader.content != null) { /* Create an annoymous listener that dispatches an event when the module is ready to show */ sm.addEventListener(FlexEvent.APPLICATION_COMPLETE, function(flexEvent:FlexEvent):void { var cmEvent:ContentManagementEvent = new ContentManagementEvent(ContentManagementEvent.CONTENT_READY_TO_SHOW); cmEvent.moduleLoader = swfLoader; // Grab a reference to the module application itself if (flexEvent.currentTarget.application is IModule) { cmEvent.moduleApp = flexEvent.currentTarget.application as IModule; } dispatch(cmEvent); }); } } } !! snippet when adding to Canvas if (event.moduleApp != null) { Logger.debug(Setting parentInjector and starting the RL context for : + moduleId); // Make sure the content fills the page var subAppComponent:SubAppBase = SubAppBase(subApp); subAppComponent.percentHeight = 100; subAppComponent.percentWidth = 100; /* Add to
[flexcoders] Strange Behavior When Loading Sub Application
Hi, I am experiencing an odd problem and I hope someone knows why. I am loading a sub-application using SWFLoader. I listen for the Event.COMPLETE command. Once the swf is loaded, I then add a listener to the SystemManager for the swf and listen for the FlexEvent.APPLICATION_COMPLETE event. At that point, I add the application as a child to a Canvas that exists in a view stack (see code below). This is great, the content loads, but it doesn't seem to load correctly. The legends in my charts are not oriented the way they should be and whenever I roll over an item with a tooltip, I get errors like the following error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.managers::SystemManager/get toolTipChildren()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:1178] at mx.charts.chartClasses::ChartBase/updateDataTipToMatchHitSet()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\ChartBase.as:3030] Does anyone have any clue what is going on?? Thanks, Jim !! snippet where swf is loaded .. var loader:SWFLoader = null; if (content.contentType == ContentData.SWF) { var uri:String = content.contentUri; var loaderContext:LoaderContext = new LoaderContext(); loaderContext.applicationDomain = ApplicationDomain.currentDomain; loaderContext.securityDomain = SecurityDomain.currentDomain; /* Create the swf loader and add it as a child to a canvas * so that it will have a place to display on the display list */ loader = new SWFLoader(); loader.scaleContent = true; loader.loaderContext = loaderContext; loader.addEventListener(Event.COMPLETE, onLoadingComplete); loader.addEventListener(IOErrorEvent.IO_ERROR, onModuleLoadError); loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onModuleLoadError); loader.load(uri); . private function onLoadingComplete(event:Event):void { var swfLoader:SWFLoader = event.currentTarget as SWFLoader; if (swfLoader != null swfLoader.content != null) { /* Create an annoymous listener that dispatches an event when the module is ready to show */ sm.addEventListener(FlexEvent.APPLICATION_COMPLETE, function(flexEvent:FlexEvent):void { var cmEvent:ContentManagementEvent = new ContentManagementEvent(ContentManagementEvent.CONTENT_READY_TO_SHOW); cmEvent.moduleLoader = swfLoader; // Grab a reference to the module application itself if (flexEvent.currentTarget.application is IModule) { cmEvent.moduleApp = flexEvent.currentTarget.application as IModule; } dispatch(cmEvent); }); } } } !! snippet when adding to Canvas if (event.moduleApp != null) { Logger.debug(Setting parentInjector and starting the RL context for : + moduleId); // Make sure the content fills the page var subAppComponent:SubAppBase = SubAppBase(subApp); subAppComponent.percentHeight = 100; subAppComponent.percentWidth = 100; /* Add to contentViewStack here based upon position Simply add as a child to the stub canvas that already exists for the module */