Update to use NSObservedKeyPathKey instead of string, add code to _setObjectValue:... in NSTableView to set the value when we have a binding

This commit is contained in:
Gregory John Casamento 2024-07-10 06:31:55 -04:00
parent 060b27a854
commit aa86a96c55
2 changed files with 17 additions and 4 deletions

View file

@ -1892,7 +1892,7 @@ Also returns the child index relative to this parent. */
if (info != nil)
{
id theItem = [_items objectAtIndex: index];
NSString *ikp = [info objectForKey: @"NSObservedKeyPath"];
NSString *ikp = [info objectForKey: NSObservedKeyPathKey];
NSUInteger location = [ikp rangeOfString: @"."].location;
NSString *keyPath = (location == NSNotFound ? ikp : [ikp substringFromIndex: location + 1]);
@ -1927,7 +1927,7 @@ Also returns the child index relative to this parent. */
if (info != nil)
{
id theItem = [_items objectAtIndex: index];
NSString *ikp = [info objectForKey: @"NSObservedKeyPath"];
NSString *ikp = [info objectForKey: NSObservedKeyPathKey];
NSUInteger location = [ikp rangeOfString: @"."].location;
NSString *keyPath = (location == NSNotFound ? ikp : [ikp substringFromIndex: location + 1]);