mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-11-23 20:19:40 +00:00
Fix connecting outlets
This commit is contained in:
parent
ca0a2d2ab7
commit
760788bbc0
@ -12,8 +12,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
@implementation NSNibOutletConnector
|
||||
|
||||
-(void)establishConnection {
|
||||
NSString *methodName=[NSString stringWithFormat:@"set%@:",[_label capitalizedString]];
|
||||
SEL selector=NSSelectorFromString(methodName);
|
||||
NSString *methodName = [NSString stringWithFormat:@"set%@%@:",
|
||||
[[_label substringToIndex:1] uppercaseString],
|
||||
[_label substringFromIndex:1]
|
||||
];
|
||||
SEL selector = NSSelectorFromString(methodName);
|
||||
|
||||
if(selector!=NULL)
|
||||
if([_source respondsToSelector:selector]){
|
||||
@ -21,7 +24,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
return;
|
||||
}
|
||||
|
||||
object_setInstanceVariable(_source,[_label UTF8String],&_destination);
|
||||
object_setInstanceVariable(_source,[_label UTF8String],_destination);
|
||||
}
|
||||
|
||||
@end
|
||||
|
Loading…
Reference in New Issue
Block a user