• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Binding to @count
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: wasting space?
  • Next by Date: Binding to displayName
  • Previous by thread: Re: wasting space?
  • Next by thread: Binding to displayName
  • Index(es):
    • Date
    • Thread