Fix type issue with getting value from KVP in a couple of places and fix memory issue with NSDictionaryControllerKeyValuePair

This commit is contained in:
Gregory John Casamento 2023-02-28 03:55:34 -05:00
parent dcf5fbe74b
commit 99e921ea35

View file

@ -202,7 +202,7 @@
FOR_IN(NSDictionaryControllerKeyValuePair*, kvp, array)
{
NSString *k = [kvp key];
NSString *v = [kvp value];
id v = [kvp value];
[_contentDictionary setObject: v
forKey: k];
@ -422,17 +422,26 @@
return self;
}
- (void) dealloc
{
RELEASE(_key);
RELEASE(_value);
RELEASE(_localizedKey);
[super dealloc];
}
/**
* Returns a copy of the key
*/
- (NSString *) key
{
return [_key copy];
return _key;
}
- (void) setKey: (NSString *)key
{
ASSIGN(_key, key);
ASSIGNCOPY(_key, key);
}
/**
@ -440,22 +449,22 @@
*/
- (id) value
{
return [_value copy];
return _value;
}
- (void) setValue: (id)value
{
ASSIGN(_value, value);
ASSIGNCOPY(_value, value);
}
- (NSString *) localizedKey
{
return [_localizedKey copy];
return _localizedKey;
}
- (void) setLocalizedKey: (NSString *)localizedKey
{
ASSIGN(_localizedKey, localizedKey);
ASSIGNCOPY(_localizedKey, localizedKey);
}
- (BOOL) isExplicitlyIncluded