tag:robotlegs.tenderapp.com,2009-10-18:/discussions/questions/35-injector-metadataRobotlegs: Discussion 2018-10-18T16:35:07Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/8362552010-01-11T16:09:31Z2010-01-11T16:09:31ZInjector metadata<div><p>You can indeed use metadata to specify named mappings for ctor
arguments:<br>
SwiftSuspenders (and I assume you're using the bundled
SwiftSuspenders<br>
injector, right?) supports named method argument injections via
the<br>
"name" parameter to the "Inject" metadata: [Inject(name='name1',
name='name2',name='')] For multiple arguments, you just repeat the
"name" parameter for each<br>
one - they are resolved based on the position in the argument
list,<br>
same as function arguments are generally resolved in AS3.</p>
<p>Note that you have to put the metadata above the class
definition<br>
instead of above the ctor itself. That's an unfortunate limitation
of<br>
the MXMLC compiler that cannot be worked around.</p>
<p>For (slightly) more details, please refer to the
SwiftSuspenders<br>
README at <a href=
"http://github.com/tschneidereit/SwiftSuspenders">http://github.com/tschneidereit/SwiftSuspenders</a></p></div>Till Schneidereittag:robotlegs.tenderapp.com,2009-10-18:Comment/8362552010-01-11T16:12:01Z2010-01-11T16:12:01ZInjector metadata<div><p>-----Original Message----- From: tschneidereit [mailto:<a href=
"mailto:tender+dff5143ef8b3462c288ebc4aa278023a5a9763bb3@tenderapp.com">tender+dff5143ef8b3462c288ebc4aa278023a5a9763bb3@tenderapp.com</a>]<br>
Sent: 11 January 2010 16:10<br>
To: James Hay<br>
Subject: Re: Injector metadata [Questions]</p>
<p>That’s awesome.. thanks. Had solved the named inject
problem just not putting the metadata above the class definition.
Thanks</p>
<p>J</p></div>james.hay