On May 11, 2009, at 07:43, Alex Smith wrote:

Here is the full error listing.

2009-05-11 08:22:55.043 RaiseMan[2935:10b] [<NSCFArray 0x158f90> addObserver:forKeyPath:options:context:] is not supported. Key path: personName 2009-05-11 08:22:55.062 RaiseMan[2935:10b] [<NSCFArray 0x16efb0> addObserver:forKeyPath:options:context:] is not supported. Key path: personName 2009-05-11 08:22:55.067 RaiseMan[2935:10b] [<NSCFArray 0x158f90> addObserver:forKeyPath:options:context:] is not supported. Key path: expectedRaise 2009-05-11 08:23:02.160 RaiseMan[2935:10b] [<NSCFArray 0x16efb0> addObserver:forKeyPath:options:context:] is not supported. Key path: expectedRaise

I am not using an IBOutlet or IBAction for two reasons. 1) The author did not use them is his example (nor are they in his project code) and 2) I am binding personName and expectedRaise to the table columns.

Actually, the terminology works the other way round. You're binding the table columns to [something that gives you access to properties] personName and expectedRaise.

So Table Column binding is set to bind to Array Controler, Controller Key = Arranged Objects, model key path = personName. (same for expectedRaise).

That's perfectly fine. Note that the table column is actually bound to ArrayController.arrangedObjects -- that is to an array property of the ArrayController. For a specific row, the table view fetches the corresponding [non-array] object of that array, and extracts the desired properties (personName and expectedRaise) from that [non- array] object. Although we typically say that the column is "bound to ArrayController.arrangedObjects.personName", that isn't literally true because that's not a valid key path. (And that's why controller key and model key are separate in the binding.)

This suggests that your problem is not the table column binding, but the ArrayController's content binding (or its content connection, if you're not using bindings there). According to the error message, the ArrayController's content is an array of arrays instead of an array of Person objects.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to