tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/668-what-is-wrong-whith-this-approachRobotlegs: Discussion 2012-10-25T15:01:06Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/200265232012-10-25T09:35:59Z2012-10-25T09:36:00ZWhat is wrong whith this approach?<div><p>Sorry. I´m using RobotLegs 1.5 and Flex SDK 4.6</p></div>Fernandotag:robotlegs.tenderapp.com,2009-10-18:Comment/200265232012-10-25T09:58:12Z2012-10-25T10:00:31ZWhat is wrong whith this approach?<div><p>ok, just a quick look at your code above (but not the attached
project) and I would say that the reason for failure is that to
fulfil the injection points the Application will have to be created
by, or at leased be injectInto() by the Injector. Since it is the
Main Application, by its nature it will be the first thing created,
so you will have to manually injectInto</p>
<p>I think that in the Context you will have to:</p>
<pre>
<code> override public function startup():void {
var myClassInstance:MyClass = new MyClass();
injector.mapValue(MyClass, myClassInstance);
injector.injectInto( contextView );
super.startup();
}</code>
</pre>
<p>That should do it</p></div>neiltag:robotlegs.tenderapp.com,2009-10-18:Comment/200265232012-10-25T10:02:04Z2012-10-25T10:02:05ZWhat is wrong whith this approach?<div><p>Yes Neil, that is the problem. I have no words to express my
gratitude. Thanks</p></div>Fernandotag:robotlegs.tenderapp.com,2009-10-18:Comment/200265232012-10-25T10:16:17Z2012-10-25T10:16:17ZWhat is wrong whith this approach?<div><p>then please express yourself in a dance form of your
choosing.</p></div>neiltag:robotlegs.tenderapp.com,2009-10-18:Comment/200265232012-10-25T14:30:18Z2012-10-25T14:30:18ZWhat is wrong whith this approach?<div><p>Fernando, may I close this thread, or are you still dancing?
;-)</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/200265232012-10-25T14:45:30Z2012-10-25T14:45:30ZWhat is wrong whith this approach?<div><p>close please. I' m too tired of play the corn's dance<br>
El 25/10/2012 16:31, "Ondina D.F." <<br>
<a href=
"mailto:tender+d03041369937d203a529992caf90418c1cccd3fa9@tenderapp.com">
tender+d03041369937d203a529992caf90418c1cccd3fa9@tenderapp.com</a>>
escribió:</p></div>Fernando Diaz Garciatag:robotlegs.tenderapp.com,2009-10-18:Comment/200265232012-10-25T15:01:04Z2012-10-25T15:01:04ZWhat is wrong whith this approach?<div><p>Haha, ok.</p></div>Ondina D.F.