tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/17-hello-flex-issuesRobotlegs: Discussion 2013-04-28T10:03:24Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/6822032009-12-06T00:36:38Z2009-12-06T00:36:42Zhello flex issues<div><p>i downloaded robotlegs and swfsuspenders code and when i debug
in Flex 3 HelloFlex.mxml, i get the following error from the
begining</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.helloflex.view::MessageListMediator/onRegister()[/Users/juan/Desktop/<study>/framework/robotleg/samples/helloflex/org/robotlegs/demos/helloflex/view/MessageListMediator.as:20]
at org.robotlegs.base::MediatorBase/preRegister()[/Users/juan/Desktop/<study>/framework/robotleg/samples/helloflex/org/robotlegs/base/MediatorBase.as:66]
at org.robotlegs.base::MediatorMap/registerMediator()[/Users/juan/Desktop/<study>/framework/robotleg/samples/helloflex/org/robotlegs/base/MediatorMap.as:163]
at org.robotlegs.base::MediatorMap/createMediator()[/Users/juan/Desktop/<study>/framework/robotleg/samples/helloflex/org/robotlegs/base/MediatorMap.as:148]
at org.robotlegs.base::MediatorMap/onViewAdded()[/Users/juan/Desktop/<study>/framework/robotleg/samples/helloflex/org/robotlegs/base/MediatorMap.as:263]
at flash.display::DisplayObjectContainer/addChildAt()
at mx.managers::SystemManager/preloader_preloaderDoneHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:2980]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/displayClassCompleteHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\preloaders\Preloader.as:434]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::DownloadProgressBar/timerHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\preloaders\DownloadProgressBar.as:1451]
at mx.preloaders::DownloadProgressBar/initCompleteHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\preloaders\DownloadProgressBar.as:1503]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/dispatchAppEndEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\preloaders\Preloader.as:291]
at mx.preloaders::Preloader/appCreationCompleteHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\preloaders\Preloader.as:442]
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]</code>
</pre></div>Juan Mendeztag:robotlegs.tenderapp.com,2009-10-18:Comment/6822032009-12-06T00:52:45Z2009-12-06T00:54:15Zhello flex issues<div><p>Hello,</p>
<p>If you compile against the source for both Robotlegs and
SwiftSuspenders you must include:</p>
<pre>
<code>-keep-as3-metadata+=Inject</code>
</pre>
<p>and</p>
<pre>
<code>-keep-as3-metadata+=PostConstruct</code>
</pre>
<p>in your compiler options.</p>
<p>Alternatively, you can just compile your app against the
Robotlegs SWC.</p>
<p>If you want to compile against the Robotlegs source, and you
don't want to include the compiler options, then you should include
the SwiftSuspenders SWC in your build path.</p>
<p>Background: Robotlegs and SwiftSuspenders both need those
compiler options. Using either SWC file will include the options
for you. Robotlegs includes SwiftSuspenders in it, so it's not
advisable to include both SWC files at the same time. Either just
use the Robotlegs SWC, or link to the Robotlegs source and include
the SwiftSuspenders SWC.</p>
<p>We definitely need to make this more clear - Sorry for the
inconvenience!</p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/6822032009-12-06T00:53:05Z2009-12-06T00:53:05Zhello flex issues<div><p>This is a linking issue (ie, the framework isn't linked). You
need to add the robotlegs swc to your project's libs folder. If you
have dropped the robotlegs and swiftsuspenders code into the
HelloFlex project then you need to add the following to your
compiler options:</p>
<p>-keep-as3-metadata+=Inject -keep-as3-metadata+=PostConstruct</p></div>Joel Hookstag:robotlegs.tenderapp.com,2009-10-18:Comment/6822032009-12-07T15:00:36Z2009-12-07T15:00:36Zhello flex issues<div><p>I'm going to mark this issue as Resolved, but if you feel it
hasn't been properly addressed, please feel free to re-open it.</p></div>Shaun Smith