tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/493-why-would-a-mediator-not-receive-an-event-from-a-viewRobotlegs: Discussion 2012-02-27T16:34:24Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/139618872012-02-24T23:49:30Z2012-02-24T23:49:30ZWhy would a Mediator not receive an event from a View?<div><p>Holy crap that was it!!!!!</p>
<p>I suspect that the amount of created stuff with both Tuio (the
multitouch library) and and loading the Vimeo stuff might have
caused my listeners to get collected.</p>
<p>Wow, you complete my week so well! Thanks so much! I would so
pay you a drink if I were in the same town!</p></div>jansensantag:robotlegs.tenderapp.com,2009-10-18:Comment/139618872012-02-24T23:51:15Z2012-02-24T23:51:15ZWhy would a Mediator not receive an event from a View?<div><p>I tried to add just the VideoBoard to the stage to see
what’s going on in there, but I can’t make it work
right now.<br>
I guess I’m already tired, so I should go to bed.<br>
I’m sure Shaun will find the culprit :)<br>
Cheers</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/139618872012-02-24T23:53:34Z2012-02-24T23:53:34ZWhy would a Mediator not receive an event from a View?<div><p>Yea he did, thanks both of you for spending so much time with me
on this! :) I owe you!</p></div>jansensantag:robotlegs.tenderapp.com,2009-10-18:Comment/139618872012-02-24T23:55:55Z2012-02-24T23:55:55ZWhy would a Mediator not receive an event from a View?<div><p>Wow! Shaun said that in his first post actually;)<br>
Glad you fixed it!!<br>
And you're welcome:)</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/139618872012-02-24T23:57:12Z2012-02-24T23:57:12ZWhy would a Mediator not receive an event from a View?<div><p>Glad to be of assistance. Bear in mind however that the solution
(forcing strong references) is really just a hacky fix - there is a
problem somewhere, and when you have the time you should try to get
to the bottom of it (break points everywhere!).</p>
<p>I'll delete your attachment. Also, I think we can leave this
thread as Private as we didn't actually resolve the issue, so I
don't think it will be helpful to anyone in the same boat.</p>
<p>Glad you're back on track. Have a good weekend :)</p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/139618872012-02-26T14:14:55Z2012-02-26T14:14:55ZWhy would a Mediator not receive an event from a View?<div><p>Looking at your code with fresh eyes.</p>
<p>BAD:</p>
<pre>
<code>
private function initContext():void
{
var c:SlideshowSS12Context = new SlideshowSS12Context(this, true);
}</code>
</pre>
<p>Not only your VideoBoardMediator, but all your other rl classes
don’t work any more after a while, because your context gets
gc-ed.</p>
<p>GOOD:<br>
<strong>private var context:SlideshowSS12Context;</strong></p>
<p>private function initContext():void<br>
{</p>
<pre>
<code>context= new SlideshowSS12Context(this, true);</code>
</pre>
<p>}</p>
<p>See:<br>
<a href=
"https://github.com/robotlegs/robotlegs-framework/wiki/Common-Problems#wiki-mysteriously-stops">
https://github.com/robotlegs/robotlegs-framework/wiki/Common-Proble...</a><br>
Problem: Things Work For A While And Then Mysteriously Stop</p>
<p>Solution: Hang on to your context!!!!</p>
<p>Try this and let us know how it works :)</p>
<p>Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/139618872012-02-27T15:35:26Z2012-02-27T15:35:26ZWhy would a Mediator not receive an event from a View?<div><p>Yes, yes you were right! :) I removed the strong references that
Shaun suggested and that indeed prevents the context from being
collected, nice thinking! I should have thought of that, I just
never faced such an issue :) Thanks again for spending so much time
to help me!</p></div>jansensantag:robotlegs.tenderapp.com,2009-10-18:Comment/139618872012-02-27T16:34:23Z2012-02-27T16:34:23ZWhy would a Mediator not receive an event from a View?<div><p>Oh, no problem. Glad you can continue developing your nice
app:)</p></div>Ondina D.F.