Re: Can't use @count with bindings
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