Skip to content
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

Properties marked as auto-wired aren't injected when using -[TyphoonComponentFactory injectProperties:] #189

Closed
fortinmike opened this issue Mar 7, 2014 · 3 comments

Comments

@fortinmike
Copy link

Hi there, thanks for the continuous work on Typhoon, it's shaping up great!

I've been trying to use -[TyphoonComponentFactory injectProperties:] to inject properties marked as auto-wired into an existing instance that was manually initialized using some data that's only available when the instance in question is required (note: I've tried TyphoonFactoryProvider but I'll reserve that for a StackOverflow question). I found out though that -injectProperties: only checks the TyphoonComponentFactory's registry for existing definitions and doesn't resolve auto-wired properties.

I would expect not to be forced to register a class explicitly in the assembly for it to work with -injectProperties: (like is the case with -componentForType:). Is there some logic behind this behaviour that I'm not getting?

In essence, I would expect all objects that are returned or processed by Typhoon in some way (including -injectProperties:) to always return a fully-injected instance, however dependencies are defined.

@jasperblues jasperblues added the bug label Mar 7, 2014
@jasperblues
Copy link
Member

Thanks for reporting this @fortinmike . . . I've marked it as a bug.

alexgarbarev added a commit that referenced this issue Jun 23, 2014
…n (to catch factory in typhoonSetFactory: method.
@jasperblues
Copy link
Member

We have a new autowiring feature #252

@alexgarbarev
Copy link
Contributor

It's fixed a long time ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants