-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Injecting an object returned by a TyphoonTypeConverter #353
Comments
Yes only a custom object. When you create definitions in a
So if you wanted a type converter to return a |
Thanks for the info. If I drop the plist mapping and configure in the assembly e.g.
Is there a way to inject properties into the dataManager which is already being injected into the view controller? |
Yes of course. The definition for the data manager can have initializer, property or method injections. And the injections can be any of these - references to other definitions, scalar values (int, BOOL, etc), inline objects or something resolved from |
Let's continue this chat on StackOverflow! http://stackoverflow.com/questions/tagged/typhoon |
I have a plist as follows defining a mapping to a custom object:
<dict>
<key>myObject</key>
<string>MyObject()</string>
<key>myObject.myURL</key>
<string>NSURL(http://myurl.com )</string>
</dict>
It seems that on implementing the TyphoonTypeConverter protocol, only a concrete object can be returned from the convert method rather than another TyphoonDefinition. Is there any way to inject the custom object returned from the TyphoonTypeConverter with another property defined in the plist?
e.g. the MyObject returned by the TyphoonTypeConverter implementation would have a property myURL set to the value defined in the plist?
The text was updated successfully, but these errors were encountered: