Flex 3 Modules Example - Factory Widget

Dustin's Avatar

Dustin

08 Dec, 2009 10:32 PM

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.

  1. 2 Posted by combes.benjamin on 09 Dec, 2009 02:41 PM

    combes.benjamin's Avatar

    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.

    at org.robotlegs.demos.acmewidgetfactory.modules.widget.view::WidgetCanvasMediator/onRegister()[/Users/Ben/Documents/Travail/Projets/Robotlegs/AcmeWidgetFactory/src/org/robotlegs/demos/acmewidgetfactory/modules/widget/view/WidgetCanvasMediator.as:20]
    at org.robotlegs.base::MediatorBase/onCreationComplete()[/Users/shaun/Documents/Development/Workspaces/GanymedeFB4/robotlegs-framework/src/org/robotlegs/base/MediatorBase.as:140]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298]
    at mx.core::UIComponent/set initialized()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1169]
    at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718]
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8628]
    at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8568]
    
  2. Support Staff 3 Posted by Ondina D.F. on 09 Dec, 2009 03:23 PM

    Ondina D.F.'s Avatar

    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. 4 Posted by combes.benjamin on 09 Dec, 2009 03:31 PM

    combes.benjamin's Avatar

    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.

  4. Support Staff 5 Posted by Ondina D.F. on 09 Dec, 2009 03:46 PM

    Ondina D.F.'s Avatar

    Indeed! The online version doesn’t work . Maybe Shaun forgot to add the module:)

  5. Support Staff 6 Posted by Ondina D.F. on 09 Dec, 2009 05:06 PM

    Ondina D.F.'s Avatar

    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. 7 Posted by jpark on 09 Dec, 2009 05:24 PM

    jpark's Avatar

    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

  7. Support Staff 8 Posted by Shaun Smith on 11 Dec, 2009 02:31 PM

    Shaun Smith's Avatar

    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. 9 Posted by Greg on 04 Jan, 2010 09:33 PM

    Greg's Avatar

    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.

  9. Till Schneidereit closed this discussion on 02 Mar, 2010 12:55 PM.

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