tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/77-injection-into-command-doesnt-seem-to-be-workingRobotlegs: Discussion 2013-04-28T10:02:18Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/14049052010-04-08T18:51:39Z2010-04-08T18:52:26Zinjection into command doesn't seem to be working<div><p>Hi Chris,</p>
<p>What's happening here is that the same instance IS being
injected into your Mediator and Command, BUT in the event handler
you are changing the Mediator's reference to point to a different
instance - doing so won't change any other references to the
original instance.</p>
<p>Instead of dealing with a single Employee instance you could
create an EmployeeModel that has a selectedEmployee property.
Inject the model into your Mediator and Command and manipulate the
selectedEmployee property as needed.</p>
<p>Hope that helps!</p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/14049052010-04-08T19:31:54Z2010-04-08T19:31:54Zinjection into command doesn't seem to be working<div><p>Wow, Shaun. Thank you. I knew it would be something simple. And
it turned out to be my misunderstanding of assignments in Flex. :-)
I just assumed that I could copy one instance of an object into
another by using the assignment operator. Apparently that's not the
case. All is well now. Thanks again.</p></div>Chris Sheffieldtag:robotlegs.tenderapp.com,2009-10-18:Comment/14049052010-04-08T19:48:45Z2010-04-08T19:48:45Zinjection into command doesn't seem to be working<div><p>Cool, no problemo :)</p></div>Shaun Smith