• 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
Can't use @count with bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't use @count with bindings


  • Subject: Can't use @count with bindings
  • From: Frédéric Testuz <email@hidden>
  • Date: Sat, 18 Dec 2004 11:00:36 +0100

Hello,

I have some difficulties to use @count on an array.
My application is document based. MyDocument object has an ivar NSMutableArray *myArray. I want to show the count of myArray in the window.


I tried to bind a text field to myArray.@count[File's Owner(MyDocument)]. But when I run the application I have this message :
[<NSCFArray 0x3025c0> addObserver:forKeyPath:options:context:] is not supported. Key path: @count


Why ? myArray IS an array. If I understand the documentation on KVC, you can use @count keypath on an array.

I have to use a NSArrayController bind to myArray[File's Owner (MyDocument)] to obtain @count. Why the first method don't work ?

--
Frédéric Testuz
<mailto:email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Can't use @count with bindings
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Bindings problem...
  • Next by Date: Re: Can't use @count with bindings
  • Previous by thread: NSController and NSRect help
  • Next by thread: Re: Can't use @count with bindings
  • Index(es):
    • Date
    • Thread