mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Fix bug in selector name translation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4971 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3e7773f754
commit
7314f58abc
2 changed files with 28 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
|||
Tue Oct 5 1999 Nicola Pero <n.pero@mi.flashnet.it>
|
||||
|
||||
* Model/IMConnectors.m ([IMOutletConnector -establishConnection]):
|
||||
Fixed bug which would get some method names wrong, as for example
|
||||
@"setInspectorview:" instead of @"setInspectorView:", due to an
|
||||
error in calling NSString's -capitalizedString.
|
||||
|
||||
Mon Oct 4 1999 Nicola Pero <n.pero@mi.flashnet.it>
|
||||
|
||||
Implementation of 'initial first responder' stuff for NSWindow:
|
||||
|
|
|
@ -102,13 +102,28 @@ GSSetInstanceVariable(id obj, NSString *iVarName, const void *data)
|
|||
{
|
||||
id _source = [source nibInstantiate];
|
||||
id _destination = [destination nibInstantiate];
|
||||
NSString* setMethodName = [[@"set" stringByAppendingString:
|
||||
[label capitalizedString]]
|
||||
stringByAppendingString:@":"];
|
||||
SEL setSelector = NSSelectorFromString (setMethodName);
|
||||
NSString* setMethodName;
|
||||
SEL setSelector;
|
||||
|
||||
// NSLog (@"establish connection: source %@, destination %@, label %@",
|
||||
// _source, _destination, label);
|
||||
if ([label length] > 1)
|
||||
{
|
||||
setMethodName = [[[label substringToIndex: 1] capitalizedString]
|
||||
stringByAppendingString:
|
||||
[label substringFromIndex: 1]];
|
||||
|
||||
setMethodName = [[@"set" stringByAppendingString: setMethodName]
|
||||
stringByAppendingString:@":"];
|
||||
}
|
||||
else
|
||||
setMethodName = [[@"set" stringByAppendingString:
|
||||
[label capitalizedString]]
|
||||
stringByAppendingString:@":"];
|
||||
|
||||
setSelector = NSSelectorFromString (setMethodName);
|
||||
|
||||
// NSLog (@"establish connection: source %@, destination %@, label %@",
|
||||
// _source, _destination, label);
|
||||
// NSLog (@"Method Name: %@", setMethodName);
|
||||
|
||||
if (setSelector && [_source respondsToSelector:setSelector])
|
||||
[_source performSelector:setSelector withObject:_destination];
|
||||
|
|
Loading…
Reference in a new issue