tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/178-mediator-event-listener-not-listening-until-after-startup-command-has-finishedRobotlegs: Discussion 2018-10-18T16:35:17Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/31808282010-10-01T08:28:29Z2010-10-01T08:28:30ZMediator event listener not listening until after startup command has finished<div><p>I'd let the mediator check whether the model already contains the required data, and in case it does, fire up the slide show.</p></div>creynderstag:robotlegs.tenderapp.com,2009-10-18:Comment/31808282010-10-01T16:38:15Z2010-10-01T16:38:18ZMediator event listener not listening until after startup command has finished<div><p>That's definitely a better idea than having the mediator dispatch an event.</p>
<p>The way this app works is it loads several photo sets and when all sets have loaded it dispatches an event. If I were to have the mediator look at the model to see if everything is loaded I'd have that logic in more than one place, which I'm not too hot on.</p>
<p>I guess I could make a method in the model that checks if all photo sets are loaded and have both the mediator and model use that one method, that wouldn't be too bad. Thanks for the idea, I think that is the best approach at this point.</p></div>Josh Grauer