I want to use an object that I got from another module. I cannot figure out how to use
#Instructing Typhoon to Inject a Pre-obtained Instance
from the doc
I am trying to do this so:
self.someAssembly = [[SomeAssembly new] activated];
[self.someAssembly inject:someObject];
SomeModule *module = [self.someAssembly getModule];
If I try to inject it by type in some definition I get crash with message:
No components defined which satisify type: 'SomeObject'
So how can I use this very someObject
in my definitions from SomeAssembly
?
Thank you!
This happens because injecting an object that was built outside of Typhoon does not register it with the assembly.
Is it possible you can register a definition?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.