tag:robotlegs.tenderapp.com,2009-10-18:/discussions/robotlegs-2/3724-ieventdispatcher-null-in-modelRobotlegs: Discussion 2013-08-30T08:00:16Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/276191682013-07-11T12:13:53Z2013-07-11T12:13:53ZIEventDispatcher null in Model<div><blockquote>
<p>just store the context instance in a property, BEFORE starting
the method chaining:</p>
</blockquote>
<p>Yes, that’s already been discussed in the previous posts.
[<a href=
"http://knowledge.robotlegs.org/discussions/robotlegs-2/3724-ieventdispatcher-null-in-model#comment_27688000">http://knowledge.robotlegs.org/discussions/robotlegs-2/3724-ieventd...</a>]</p>
<blockquote>
<p>it doesn't have anything to do with the context view already
being on the stage.</p>
</blockquote>
<p>Ok, then we don’t need the StageSyncExtension at all.<br>
We could do just this:</p>
<pre>
<code>public function MinimalistContext(view:DisplayObjectContainer)
{
_context = new Context()
.afterInitializing(afterInitializing)
.install(ContextViewExtension)
.install(ViewManagerExtension)
.configure(ContextViewListenerConfig)
.configure(new ContextView(view))
_context.initialize();
}</code>
</pre>
<blockquote>
<p>Probably we should point this out somewhere in the
documentation.</p>
</blockquote>
<p>Oh yes, we should!!!</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/276191682013-07-11T12:31:04Z2013-07-11T12:31:04ZIEventDispatcher null in Model<div><p>The StageSyncExtension is indeed the culprit here. I've been
considering making it wait a frame for ages, I'm just a little
concerned with subtle side-effects</p></div>Shaun Smith