-
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
Non-invasive version of TyphoonComponentFactoryAware #131
Comments
Planning to implement this in the next 48 hours. . . |
Here’s how I plan to do it:
|
Jasper, did you start working on this issue or it's still open for anyone? |
I got caught up in some other things (TCF+InstanceBuilder - refactor to create NSInvocation without requiring initTarg instance). . . you can take it. |
Once this feature is done, we should update this StackOverflow question: http://stackoverflow.com/questions/20405636/typhoon-injecting-a-view-controller-provider/20407286#20407286
|
If you take #153 can I take this back again tomorrow? |
#153 is implemented. You can take this issue |
Now this issue implemented and waits for review |
I did it a bit different, not so much as you've suggested above. Please review and refactor if needed. |
It works fine, however I think its important to keep the TyphoonBlockComponentFactory concerns separate from the base, which is why I suggested using a TyphoonComponentFactoryPostProcessor. To do this we'd need:
. . the post processor would then run over the block assembly and convert any auto-injected assemblies to inject the factory. |
[definition injectProperty:@selector(someProperty) withFactory]; Can't be done in objective-c. You cannot use I agree with using TyphoonComponentFactoryPostProcessor for assemblies. I'll try to do it. Also about method naming: I want to note that using |
Oops. . . how did I write that!?!? I meant: [definition injectWithFactory:@selector(someProperty)]; Yes, lets rename register. . . AppCode has been showing me that its a reserved keyword for a long time, but nothing has been done about it yet. . . Its basically an internal method (unless someone wants to use the base factory directly) so we can rename it with minimal impact. |
Ok. [definition injectPropertyWithComponentFactory:@selector(property)] because we already used factory word in definitions methods to specify some objects factories (not TyphoonComponentsFactory) - see method: - (void)injectProperty:(SEL)selector withDefinition:(TyphoonDefinition *)factoryDefinition selector:(SEL)factorySelector; What do you think about method naming? How should we indicate to user that we will inject TyphoonComponentsFactory - not SomeObjectFactory |
👍 |
Now factory/assembly property injection-by-type replaced by postprocessors with injection-with-component-factory
Pushing this as 1.8.0. . although we may refactor internally, useful as-is. |
What would you like to refactor for this issue? |
Oops. We discussed using a PostProcessor instead of making the base TyphoonComponentFactory aware of the block style. It looks like you've already implemented that. |
We have a non-invasive version of TyphoonPropertyInjectionDelegate (by that I mean your class doesnt' have to have any dependencies on Typhoon). .
. . we need the same for TyphoonComponentFactoryAware . . I guess this would be just injecting the factory from the block/XML-style assembly
Implementation:
The text was updated successfully, but these errors were encountered: