tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/255-mediators-not-receiving-updates-from-relaxedeventmapRobotlegs: Discussion 2018-10-18T16:35:22Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/50973342011-02-02T20:14:57Z2011-02-02T20:14:57ZMediators not receiving updates from RelaxedEventMap<div><p>Hi Kyle,</p>
<p>hmm... nothing springs to mind.</p>
<p>Obviously there are the usual things: you need to be making sure
your relaxedEventMap isn't getting garbage collected, which could
happen if it was a property of the context and the context was
being garbage collect just as the mediator was being created...</p>
<p>When you say 'some' of your mediators aren't receiving the
relaxedEventMap updates - is there a consistent difference between
either:</p>
<p>1) The mediators that are/aren't receiving<br>
2) The events that are / aren't being received</p>
<p>I would start with the things that impact on the normal eventMap
as well - for example have you definitely overridden clone in the
custom events?</p>
<p>Also - are these updates that should be in the history (and so
you're expecting them as soon as you register the handler in the
mediator's onRegister) or is it later updates that occur after the
mediator is on stage that you're not seeing consistently? Obviously
the relaxedEventMap should work for both.</p>
<p>If you want to bundle up your code and email it to dailystraying
at gmail dot com I can take a look straight away.</p>
<p>Cheers,</p>
<p>Stray</p></div>Straytag:robotlegs.tenderapp.com,2009-10-18:Comment/50973342011-02-02T21:58:42Z2011-02-02T21:58:42ZMediators not receiving updates from RelaxedEventMap<div><p>Hey Stray,<br>
I really appreciate the help man (or at least the offer to help
ha), but I<br>
walked away for an hour to get some lunch and (as usual) upon
return, I<br>
rather quickly found the ridiculous cause of my error. When I
was<br>
registering my relaxed events in the context, I accidentally (due
to<br>
copy/paste error) set the event types to the wrong class.</p>
<p>ex (note the type FeedEvent):</p>
<p>
relaxedEventMap.rememberEvent(AuthenticationEvent.USER_AUTHENTICATED,<br>
FeedEvent);</p>
<p>Should have been:</p>
<p>
relaxedEventMap.rememberEvent(AuthenticationEvent.USER_AUTHENTICATED,
AuthenticationEvent);</p>
<p>As soon as I mapped it to the correct event type it work (go
figure)! Thanks<br>
again!</p>
<p>On a side note, Robotlegs Gotcha <a href=
"/discussions/problems/4" title="Discussion #4">#4</a> is now up on
my site:<br>
<a href=
"http://www.geekgonenomad.com/2011/02/02/robotlegs-gotcha-4-relaxedeventmap-and-unmaplistenersfor/">
http://www.geekgonenomad.com/2011/02/02/robotlegs-gotcha-4-relaxede...</a></p>
<p>-Kyle</p>
<p>On Wed, Feb 2, 2011 at 12:15 PM, Stray <<br>
<a href=
"mailto:tender+dc2ede38b0f67e86cc2bd623a626f9137fdd6333b@tenderapp.com">
tender+dc2ede38b0f67e86cc2bd623a626f9137fdd6333b@tenderapp.com</a><<a href="mailto:tender%2Bdc2ede38b0f67e86cc2bd623a626f9137fdd6333b@tenderapp.com">tender%2Bdc2ede38b0f67e86cc2bd623a626f9137fdd6333b@tenderapp.com</a>><br></p>
<blockquote>
<p>wrote:</p>
</blockquote></div>Kyletag:robotlegs.tenderapp.com,2009-10-18:Comment/50973342011-02-02T22:07:49Z2011-02-02T22:07:49ZMediators not receiving updates from RelaxedEventMap<div><p>Excellent!</p>
<p>About 99% of my errors are those kind of MRTEs (Mental Run Time
Errors).</p>
<p>Glad you got it sorted,</p>
<p>Stray</p></div>Stray