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

Re: Can't use @count with bindings


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

Le 18 déc. 04, à 11:27, mmalcolm crawford a écrit :


On Dec 18, 2004, at 2:00 AM, Frédéric Testuz wrote:

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.


KVC, yes; KVO...?

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

As the error message says, arrays per se don't support observing of count. If you're using an array with bindings, use an array controller...

OK, I wished I had a solution without adding an array controller for each array. Well, I will go with this solution.


--
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


References: 
 >Can't use @count with bindings (From: Frédéric Testuz <email@hidden>)
 >Re: Can't use @count with bindings (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: Weird behavior in NSMutableDictionary
  • Next by Date: Re: Secure communication between two process
  • Previous by thread: Re: Can't use @count with bindings
  • Next by thread: NSSearchField...Solution
  • Index(es):
    • Date
    • Thread