tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/14-failed-to-inject-widgetcanvas-in-widgetcanvasmediator-when-widgetmodule-gets-loadedRobotlegs: Discussion 2013-04-28T10:03:24Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/6363832009-11-25T20:15:42Z2009-11-26T00:00:18ZFailed to inject WidgetCanvas in WidgetCanvasMediator when WidgetModule gets loaded?<div><p>I see that view property in WidgetCanvasMediator upon onRegister
call.</p>
<p>TypeError: Error <a href="/discussions/problems/1009" title=
"Discussion #1009">#1009</a>: Cannot access a property or method of
a null object reference.<br></p>
<pre>
<code>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]</code>
</pre></div>jparktag:robotlegs.tenderapp.com,2009-10-18:Comment/6363832009-11-25T20:43:35Z2009-11-26T00:00:18ZFailed to inject WidgetCanvas in WidgetCanvasMediator when WidgetModule gets loaded?<div><p>I see that view property in WidgetCanvasMediator is null upon
onRegister call.</p></div>jparktag:robotlegs.tenderapp.com,2009-10-18:Comment/6363832009-11-25T20:46:22Z2009-11-25T20:46:22ZFailed to inject WidgetCanvas in WidgetCanvasMediator when WidgetModule gets loaded?<div><p>Hello,</p>
<p>Could you post the part of the mediator where you have set the
view component for injection?</p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/6363832009-11-25T21:12:15Z2009-11-26T00:00:18ZFailed to inject WidgetCanvas in WidgetCanvasMediator when WidgetModule gets loaded?<div><p>This happened from unmodified AcmeWiedgetFactory example.</p>
<p>Take a look at WidgetCanvasMediator. Especially, when onRegister
is called, view property is null.</p>
<p>This also happened when I tried on live example.<br>
<a href=
"http://examples.robotlegs.org/widgetfactory/index.html">http://examples.robotlegs.org/widgetfactory/index.html</a></p>
<p>FYI, I am running debug version of Flash player 10.</p></div>jparktag:robotlegs.tenderapp.com,2009-10-18:Comment/6363832009-11-25T21:14:14Z2009-11-26T00:00:18ZFailed to inject WidgetCanvas in WidgetCanvasMediator when WidgetModule gets loaded?<div><p>BTW, I love what you guys are doing. Thanks for the good work
and Happy Thanksgiving.</p></div>jparktag:robotlegs.tenderapp.com,2009-10-18:Comment/6363832009-11-25T21:15:03Z2009-11-25T21:15:03ZFailed to inject WidgetCanvas in WidgetCanvasMediator when WidgetModule gets loaded?<div><p>Oh no! Thanks for pointing that out - I will look into it
ASAP.</p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/6363832009-12-04T14:08:57Z2009-12-04T14:10:32ZFailed to inject WidgetCanvas in WidgetCanvasMediator when WidgetModule gets loaded?<div><p>I rebuilt AcmeWidgetFactory using Flex SDK 4 instead of 3.x. To
my surprise, it didn't show the error! What does that tell you?
BTW, it works well as AIR app.</p></div>jparktag:robotlegs.tenderapp.com,2009-10-18:Comment/6363832009-12-07T15:46:26Z2009-12-07T15:46:26ZFailed to inject WidgetCanvas in WidgetCanvasMediator when WidgetModule gets loaded?<div><p>Weird! I'm not sure what was causing the initial error. Besides,
the AcmeWidgetFactory is a pretty old demo now, and could really do
with a re-build.</p></div>Shaun Smith