-
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
Property nil-ed after constructor injection. #306
Comments
It looks ok, did not notice any problems. What version of Typhoon are you using? Is there a difference between sim and device? Some early 2.x versions showed problems on 64bit devices. |
Hey, Your code looks correct. |
Or if still no luck, a sample project. |
Thanks for help! |
That is very strange. But I think no need to worry now. We've got Typhoon behaving solidly in plenty of apps. |
Please report back if you notice the issue again. |
Sorry, my bad. I haven't noticed one change :/ Problem Is back. So here is full code of factory:
And my appDelegate
In second case, both MyViewController and MyScanner are dellacoted during TyphoonStackElement destrucion (TyphoonStackElement.cxx_destruct). |
This line looks strange: TyphoonComponentFactory *factory = [[TyphoonBlockComponentFactory alloc]
initWithAssemblies:@[
[ViewControllerAssembly assembly],
[ComponentsAssembly assembly]
]];
self.window.rootViewController = [(ViewControllerAssembly*) factory sidePanelController]; Check quick start guide or wiki: https://github.com/appsquickly/Typhoon/wiki/Quick-Start |
I'm doing it:
|
[removed incorrect comment - mistook |
I can't see any usage of |
@jasperblues @alexgarbarev
|
@mmiedlarz, [not related to current problem, but] . . . it definitely sounds like you want plist integration then. Besides injecting into your app delegate, it will also give injection on UIStoryboard created classes according to definitions in your assemblies or with autowiring. Furthermore it bootstraps Typhoon at the right time for UIStateRestoration to work correctly and encourages avoiding the use of singletons, by instead injecting Typhoon as you proceed from one object graph to another. |
What properties attributes you have for I see next strange thing: your |
@alexgarbarev @jasperblues |
Hmm. Looks strange.. Try to include
|
Hey, Okay, solved. Problem was in totally different place. SidePanelController was recreating all panels in viewDidLoad. Cheers, |
@mmiedlarz Thanks for choosing Typhoon. |
Hey,
Its my first approach to DI in obj-c, so I'm using Typhoon to inject some components to my ViewController (using constuctor injection).
In constructor everything works great, but in viewDidLoad all injected parameters are set to nil.
Here is my code:
ViewController:
Factory:
ComponentsAssembly:
Output:
Am I doing something wrong, or did I forgot something?
Cheers,
M.
The text was updated successfully, but these errors were encountered: