{"action":"opened","issue":{"url":"https://api.github.com/repos/appsquickly/Typhoon/issues/514","repository_url":"https://api.github.com/repos/appsquickly/Typhoon","labels_url":"https://api.github.com/repos/appsquickly/Typhoon/issues/514/labels{/name}","comments_url":"https://api.github.com/repos/appsquickly/Typhoon/issues/514/comments","events_url":"https://api.github.com/repos/appsquickly/Typhoon/issues/514/events","html_url":"https://github.com/appsquickly/Typhoon/issues/514","id":163083074,"number":514,"title":"Use parent definition with same selector name causes forever loop","user":{"login":"rock88","id":323908,"avatar_url":"https://avatars.githubusercontent.com/u/323908?v=3","gravatar_id":"","url":"https://api.github.com/users/rock88","html_url":"https://github.com/rock88","followers_url":"https://api.github.com/users/rock88/followers","following_url":"https://api.github.com/users/rock88/following{/other_user}","gists_url":"https://api.github.com/users/rock88/gists{/gist_id}","starred_url":"https://api.github.com/users/rock88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rock88/subscriptions","organizations_url":"https://api.github.com/users/rock88/orgs","repos_url":"https://api.github.com/users/rock88/repos","events_url":"https://api.github.com/users/rock88/events{/privacy}","received_events_url":"https://api.github.com/users/rock88/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-06-30T05:22:00Z","updated_at":"2016-06-30T05:22:00Z","closed_at":null,"body":"Hello,\r\nI want to use some default assembly with few definitions with few default property injection. This assembly may be like:\r\n```objective-c\r\n@implementation AssemblyA\r\n\r\n- (UIViewController *)viewController {\r\n    return [TyphoonDefinition withClass:[UIViewController class] configuration:^(TyphoonDefinition *definition) {\r\n        [definition injectProperty:@selector(title) with:@\"TitleA\"];\r\n        [definition injectProperty:@selector(output) with:[self presenter]];\r\n        //other injections\r\n    }];\r\n}\r\n\r\n- (Presenter *)presenter {\r\n    return [TyphoonDefinition withClass:[Presenter class] configuration:^(TyphoonDefinition *definition) {\r\n         [definition injectProperty:@selector(view) with:[self viewController]];\r\n    }];\r\n}\r\n\r\n@end\r\n```\r\n\r\nNext I make ```AssemblyB``` (subclasses from ```AssemblyA```) with same definition name and want to change ```UIViewController``` class (and maybe few new property injections):\r\n```objective-c\r\n@implementation AssemblyB\r\n\r\n- (UIViewController *)viewController {\r\n    return [TyphoonDefinition withClass:[LoginViewController class] configuration:^(TyphoonDefinition *definition) {\r\n        definition.parent = [super viewController];\r\n        //other injections\r\n    }];\r\n}\r\n\r\n@end\r\n```\r\nIn this case Typhoon framework entered in forever loop.\r\n\r\nFor resolve this issues I use several solutions:\r\n1. Just rename definition name in ```AssemblyB``` (For this options all definitions, which use original ```-viewController``` will be not use new, for example ```-[AssemblyA presenter]``` will be injected with original ```-viewController```);\r\n2. Don't use ```definition.parent``` and copy/paste all injection from ```-[AssemblyA viewController]``` (copy/paste - bad solution 😕 )\r\n\r\nMaybe you can explain me how best solution for this case, ideally for me - if  ```definition.parent = [super viewController] ``` will be work.\r\n\r\nThanks in advance for any help!"}}
{"actor":{"display_login":"rock88"}}