mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 00:30:58 +00:00
Update how key/value is generated in newObject
This commit is contained in:
parent
3fdccf627e
commit
917585cfab
1 changed files with 11 additions and 3 deletions
|
@ -129,11 +129,19 @@
|
|||
- (NSDictionaryControllerKeyValuePair *) newObject
|
||||
{
|
||||
NSDictionaryControllerKeyValuePair *kvp = [[NSDictionaryControllerKeyValuePair alloc] init];
|
||||
NSString *k = [NSString stringWithFormat: @"%@%lu", _initialKey, _count];
|
||||
NSString *v = [NSString stringWithFormat: @"%@%lu", _initialValue, _count];
|
||||
NSString *k = nil;
|
||||
|
||||
if (_count > 0)
|
||||
{
|
||||
[NSString stringWithFormat: @"%@%lu", _initialKey, _count];
|
||||
}
|
||||
else
|
||||
{
|
||||
k = [_initialKey copy];
|
||||
}
|
||||
|
||||
[kvp setKey: k];
|
||||
[kvp setValue: v];
|
||||
[kvp setValue: _initialValue];
|
||||
|
||||
_count++;
|
||||
AUTORELEASE(kvp);
|
||||
|
|
Loading…
Reference in a new issue