Binding to @count
Binding to @count
- Subject: Binding to @count
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Sun, 5 Oct 2008 10:39:41 +0200
In a document based Tiger (10.4.11) app I have
@interface MyDocument : NSDocument
{
NSMutableArray *things;
}
Inspector.nib has an NSObjectController with content = current
MyDocument
and an NSTextField with value bound to selection.things.@count.
When the Inspector gets loaded I get:
... [<NSCFArray 0x3a6400> addObserver:forKeyPath:options:context:] is
not supported. Key path: @count
Workaround:
implement in MyDocument:
- (unsigned int)countOfThings { return [ things count ] }
and bind NSTextField to selection.countOfThings.
Why does @count not work? What am I doing wrong?
Kind regards,
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden