• 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: error displaying @count via bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error displaying @count via bindings


  • Subject: Re: error displaying @count via bindings
  • From: Keary Suska <email@hidden>
  • Date: Mon, 02 Apr 2007 12:29:07 -0600
  • Thread-topic: error displaying @count via bindings

on 4/2/07 11:50 AM, email@hidden purportedly said:

> I am certain that it is 10.4 (on my Intel macbook)
>>
>> Which Mac OS X SDK are you linking against?
>>
>>
>>
>>> I have a class  that has a NSMutableArray. I have established all
>> of the
>>> proper KVC accessors and setters to "ensure" automatic KVO. I bind a
>>> tableColumn's value to myArray.@count to display the total number
>> of items in
>>> each array instance. It works properly and displays the number of
>> items in
>>> myArray, however, I am getting a log alert that:
>>>
>>>  [<NSCFArray 0x3c11c0> addObserver:forKeyPath:options:context:]
>> is not
>>> supported. Key path: @count
>>>
>>> What would account for this error?

Oop, I wasn't paying attention. I recall that the array and set operators
are not observable, at least not for an array. I think you have to "proxy"
through an NSArrayController, which I believe will eliminate the error.
Never had to do it myself, but that's what I have heard.

I don't think this is well documented, or obviously documented--i.e. neither
the KVC, KVO, or Bindings docs mention this, that I recall.

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

References: 
 >Re: error displaying @count via bindings (From: email@hidden)

  • Prev by Date: Re: optimizing background image drawing with -drawRect
  • Next by Date: Re: optimizing background image drawing with -drawRect
  • Previous by thread: Re: error displaying @count via bindings
  • Next by thread: Re: error displaying @count via bindings
  • Index(es):
    • Date
    • Thread