tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/5745-signal-is-never-being-injectedRobotlegs: Discussion 2014-07-02T07:17:54Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/330052422014-05-16T16:31:57Z2014-05-27T09:09:04ZSignal is never being injected<div><p>After going through the robotlegs framework documentation - I
found the answer:</p>
<p>I changed the _baseConnection to be an interface, and moved
everything from BaseConnection's constructor into init method and
now I am injecting it inside my BBConnection.</p>
<p>Here how BBConnection looks now:</p>
<p>[Inject] public var baseConnection:IBaseConnection;</p>
<p>public function BBConnection()<br>
{ }</p>
<p>[PostConstruct] public function init():void<br>
{ baseConnection.init(this); }</p>
<p>Now I can successfully inject Disconnect signal inside base
connection.</p>
<p>Source: <a href=
"https://github.com/robotlegs/robotlegs-framework/wiki/common-problems#injected-properties-are-null-in-constructor">
https://github.com/robotlegs/robotlegs-framework/wiki/common-proble...</a></p></div>Stantag:robotlegs.tenderapp.com,2009-10-18:Comment/330052422014-05-17T03:36:16Z2014-05-27T09:09:03ZSignal is never being injected<div><p>Hi Stan. The signals are mapped automatically when you call<br>
SignalCommandMap.map(...) or Injector.map(...). If you don't
already have<br>
a command for your signal you can map it as a singleton</p>
<p>Injector.map(DisconnectUserSignal).asSingleton();</p>
<p>That way the signal will be injected into other classes. You can
later<br>
change the Injector.map for SignalCommandMap.map and a command.</p></div>greenLED