Flex 3 Modules Example - Factory Widget
When running the Flex 3 Modules example (Widget Factory - http://examples.robotlegs.org/widgetfactory/index.html) in Firefox with the Flash Debug Player 10.0.32.18, I get the following error in the debug popup when I try creating a new widget:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at org.robotlegs.demos.acmewidgetfactory.modules.widget.view::WidgetCanvasMediator/onRegister()
at org.robotlegs.base::MediatorBase/onCreationComplete()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\trunk\frameworks\projects\framework\src\mx\core\UIComponent.as:11701]
at mx.core::UIComponent/set initialized()[E:\dev\trunk\frameworks\projects\framework\src\mx\core\UIComponent.as:1525]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\trunk\frameworks\projects\framework\src\mx\managers\LayoutManager.as:759]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\trunk\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1069]
And the close button doesn't appear to do anything.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by combes.benjamin on 09 Dec, 2009 02:41 PM
Same problem for me on 10.0.32.18 debug on Mac :
TypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la méthode d'une référence d'objet nul.
Support Staff 2 Posted by Ondina D.F. on 09 Dec, 2009 03:23 PM
Hi
I assume you’ve already done this:
Project->Properties->FlexModules-> Add: WidgetModule.mxml
With FlashPlayer 10,1,51,45 it works just fine. It also works as an AIR app ( AIR2 Beta). [FlashBuilder 4 Beta]
3 Posted by combes.benjamin on 09 Dec, 2009 03:31 PM
Hi,
Thanks for your answer ! Unforunately, I allready did this. But I have this trouble too when using the online version of the demo, not only when I recompile it from my computer.
Support Staff 4 Posted by Ondina D.F. on 09 Dec, 2009 03:46 PM
Indeed! The online version doesn’t work . Maybe Shaun forgot to add the module:)
Support Staff 5 Posted by Ondina D.F. on 09 Dec, 2009 05:06 PM
I tried it with FlexBuilder 3, and I got the same errors as you guys.
I added this to the compiler options:
( as stated here: http://github.com/tschneidereit/SwiftSuspenders/blob/master/README....)
-keep-as3-metadata+=Inject
and now it works from Flex3 too.
This seems to be needed also with the swc (robotlegs-framework-v1.0.0.swc) not only with the source (in Flex3)
But the modules have to be added to the project though:)
6 Posted by jpark on 09 Dec, 2009 05:24 PM
I also reported this issue here.
http://knowledge.robotlegs.org/discussions/problems/14-failed-to-in...
No problem with Flex SDK 4 but had to add compiler option for meta data to make the demo work in Flex SDK 3.x
Support Staff 7 Posted by Shaun Smith on 11 Dec, 2009 02:31 PM
Hello All,
Apologies for the delay.
This demo appears to be completely broken! It works locally (compiling with the Flex 4 SDK), but not on the live examples page. To be honest I have no idea how this managed to slip through. I also have no idea why it would work locally and not live.
The demo itself is pretty terrible anyway - it really, really needs to be rebuilt. It lacks focus - I through it together very quickly to demonstrate something particular that someone had asked about. Actually, all the demos that I built were in direct response to questions that people had asked, were built at various stages of RL's development, and could all do with some refactoring.
The addition of the ViewMap to Robotlegs simplifies dealing with modules greatly. I need to put together a simpler, more focused demo that shows the new technique - and perhaps even works on the web!
Apologies for the inconvenience. I'm a little swamped right now, but I'll get to rebuilding the demos as soon as I can.
Thanks,
Shaun
8 Posted by Greg on 04 Jan, 2010 09:33 PM
Thanks for the fix Ondina. I spent several hours trying to compile in Flex 3 a project I wrote in Flex 4. I had gone to SwiftSuspenders but had not seen that page.
Till Schneidereit closed this discussion on 02 Mar, 2010 12:55 PM.