• 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
Deep thought about "Cannot remove an observer <NSKeyValueObservance XXXX> for the key path "count" .."
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Deep thought about "Cannot remove an observer <NSKeyValueObservance XXXX> for the key path "count" .."


  • Subject: Deep thought about "Cannot remove an observer <NSKeyValueObservance XXXX> for the key path "count" .."
  • From: Celery01 Lin <email@hidden>
  • Date: Wed, 1 Apr 2009 11:45:07 +0800

Hi , list

I'm working a project using a collection view. Everything is OK until I'm
using the collection content array's count and indexSet's count to disable
or enable some buttons.
I've got a array called collectionArray , and a indexSet called
collectionIndexSet .
I bind the collectionArray to a arrayController , and this arrayController
bind to the NSCollectionView; the collectionIndexSet bind to the
NSCollectionView selectedIndexes field directly.

I got a button to delete the things in the collectionView . So I bind the
arrayController.@count to Button's enable1 and selectedIndexes.count to
Button's enable2.
Now when I manipulate the collectionArray , add something or remove
something.
The Console will post "Cannot remove an observer <NSKeyValueObservance
0x1800c7e0> for the key path "count" from <NSMutableIndexSet 0x1a03a880>
because it is not registered as an observer."
Now , I have no idea what's going on here .

So my question 1, is it a good way to bind the array.@count and
indexSet.count as a key condition to a enable field directly?
and my question 2, I've tried the indexSet.@count , but the app said it
can't find the key path "@count" , so does that mean "@count" method only
works on array?

Thank you in advance


Best Regards~

- Daniel
_______________________________________________

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: NSMutableArray is null?
  • Next by Date: Subclassing NSClipView
  • Previous by thread: Re: NSMutableArray is null?
  • Next by thread: Subclassing NSClipView
  • Index(es):
    • Date
    • Thread