tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/15-hello-flash-demoRobotlegs: Discussion 2018-10-18T16:35:06Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/6395492009-11-26T16:55:56Z2009-11-26T16:56:10ZHello Flash demo.<div><p>Hi there,<br></p>
<p>Trying to investigate RobotLegs (it looks very promising), but I
can’t get your Hello Flash demo to compile. I simply started
up a new ActionScript project in Flex, added your source files and
compiled the HelloFlash.as class to generate this error. I think
the null object reference is the dispatcher property of the
EventMap class. As this is the first demo I've used, it's possible
I've mucked something up and I don't really know where to begin in
terms of debugging this. The stack trace is pasted below.<br></p>
<p>Any ideas what could be wrong?<br></p>
<p>Many thanks in advance.<br></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.base::EventMap/mapListener()[F:\_flex\HelloRobotLegs\src\org\robotlegs\base\EventMap.as:102]
at org.robotlegs.demos.helloflash.view::ReadoutMediator/onRegister()[F:\_flex\HelloRobotLegs\src\org\robotlegs\demos\helloflash\view\ReadoutMediator.as:46]
at org.robotlegs.base::MediatorBase/preRegister()[F:\_flex\HelloRobotLegs\src\org\robotlegs\base\MediatorBase.as:66]
at org.robotlegs.base::MediatorMap/registerMediator()[F:\_flex\HelloRobotLegs\src\org\robotlegs\base\MediatorMap.as:139]
at org.robotlegs.base::MediatorMap/createMediator()[F:\_flex\HelloRobotLegs\src\org\robotlegs\base\MediatorMap.as:124]
at org.robotlegs.base::MediatorMap/onViewAdded()[F:\_flex\HelloRobotLegs\src\org\robotlegs\base\MediatorMap.as:239]
at flash.display::DisplayObjectContainer/addChild()
at org.robotlegs.demos.helloflash::HelloFlashContext/startup()[F:\_flex\HelloRobotLegs\src\org\robotlegs\demos\helloflash\HelloFlashContext.as:60]
at org.robotlegs.mvcs::Context/checkAutoStartup()[F:\_flex\HelloRobotLegs\src\org\robotlegs\mvcs\Context.as:213]
at org.robotlegs.mvcs::Context()[F:\_flex\HelloRobotLegs\src\org\robotlegs\mvcs\Context.as:77]
at org.robotlegs.demos.helloflash::HelloFlashContext()[F:\_flex\HelloRobotLegs\src\org\robotlegs\demos\helloflash\HelloFlashContext.as:41]
at HelloFlash()[F:\_flex\HelloRobotLegs\src\HelloFlash.as:36]</code>
</pre></div>David Coxtag:robotlegs.tenderapp.com,2009-10-18:Comment/6395492009-11-26T17:08:19Z2009-11-26T17:08:19ZHello Flash demo.<div><p>Hey David,</p>
<p>when using the Robotlegs source code, you have to add these
parameters<br>
to your MXMLC configuration:<br>
-keep-as3-metadata+=Inject -keep-as3-metadata+=PostConstruct</p>
<p>Alternatively, you could also use the Robotlegs SWC, which
automates<br>
this process for you.</p>
<p>hope you enjoy robotlegs,<br>
till</p></div>Till Schneidereittag:robotlegs.tenderapp.com,2009-10-18:Comment/6395492009-11-26T17:15:47Z2009-11-26T17:15:50ZHello Flash demo.<div><p>Thank you. I look forward to asking more relevant questions in
the future.</p>
<p>Cheers.</p></div>David Coxtag:robotlegs.tenderapp.com,2009-10-18:Comment/6395492009-11-26T17:19:24Z2009-11-26T17:19:24ZHello Flash demo.<div><p>Everyone's got to start somewhere - and welcome to Robotlegs,
btw. :)</p>
<p>And I just realized that we don't do a good job of explaining
how to<br>
work with the Robotlegs source code on the homepage.</p></div>Till Schneidereittag:robotlegs.tenderapp.com,2009-10-18:Comment/6395492009-11-26T17:25:29Z2009-11-26T17:25:36ZHello Flash demo.<div><p>Thanks. I'm looking forward to spending my weekend rebuilding an
old PureMVC template with RobotLegs, tbh.</p>
<p>I also just noticed the README file in the zip.</p></div>David Coxtag:robotlegs.tenderapp.com,2009-10-18:Comment/6395492009-12-02T17:58:26Z2009-12-02T23:06:37ZHello Flash demo.<div><p>Hi,</p>
<p>I am running into the same issue, I downloaded the latest
version of the sample files as well as the latest of robotlegs:</p>
<p>robotlegs-framework-v1.0.0.swc<br>
SwiftSuspenders-v1.0.0.swc<br>
robotlegs-robotlegs-demos-Bundle-7e2aa61</p>
<p>and the eventDispatcher is the one breaking the app, as you can
see below:</p>
<p>All this is by using the default bundles with no customization
except for adding the trace statement for the Event Dispatcher.</p>
<p>EVENT DISPATCHER null <--<br>
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.base::EventMap/mapListener()
at org.robotlegs.demos.helloflash.view::ReadoutMediator/onRegister()
at org.robotlegs.base::MediatorBase/preRegister()
at org.robotlegs.base::MediatorMap/registerMediator()
at org.robotlegs.base::MediatorMap/createMediator()
at org.robotlegs.base::MediatorMap/onViewAdded()
at flash.display::DisplayObjectContainer/addChild()
at org.robotlegs.demos.helloflash::HelloFlashContext/startup()
at org.robotlegs.mvcs::Context/checkAutoStartup()
at org.robotlegs.mvcs::Context()
at org.robotlegs.demos.helloflash::HelloFlashContext()
at HelloFlash()</code>
</pre>
<p>Any ideas what could be causing this issue?</p>
<p>I am compiling with Flash CS4 - Flash Player 10.</p></div>Helmut Grandatag:robotlegs.tenderapp.com,2009-10-18:Comment/6395492009-12-02T18:07:27Z2009-12-02T23:06:37ZHello Flash demo.<div><p>Just by looking at the documentation I realized that the issue
is with me using CS4 to compile the application:</p>
<p><a href=
"http://knowledge.robotlegs.org/faqs/framework-core/is-robotlegs-compatible-with-the-flash-ide-cs3cs4">
http://knowledge.robotlegs.org/faqs/framework-core/is-robotlegs-com...</a></p>
<p>Just in case some one else runs into the same issue.</p></div>Helmut Grandatag:robotlegs.tenderapp.com,2009-10-18:Comment/6395492009-12-02T19:57:39Z2009-12-02T19:57:39ZHello Flash demo.<div><p>You can use Robotlegs with CS4! But there is a trick to it. I'm
in the process of writing a how-to, but here is the
quick-n-dirty:</p>
<p>in your context class, before you call super() in the
constructor, do a</p>
<p>injector = new SwiftSuspendersInjector(myConfigXML);</p>
<p>Now, you will have to create the myConfigXML - take a look at
the SwiftSuspendersInjector class to see how it looks.</p>
<p>That should be enough to get you started...</p>
<p>jos</p></div>Jos Yuletag:robotlegs.tenderapp.com,2009-10-18:Comment/6395492009-12-03T02:31:02Z2009-12-03T02:31:07ZHello Flash demo.<div><p>Thank you for the tip, I ended up writing a blog post with the
steps I followed to make the update.</p>
<p><a href="http://bit.ly/4J7tm3">http://bit.ly/4J7tm3</a></p></div>Helmut Granda