• 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: Notification when changes occur to an array?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Notification when changes occur to an array?


  • Subject: Re: Notification when changes occur to an array?
  • From: Mattias Arrelid <email@hidden>
  • Date: Mon, 2 Oct 2006 08:56:55 +0200


This sounds like the NSMutableArray isn't completely KVO? Like there is no method for setting a new count? Or am I wrong? *confused*

No, NSMutableArray is fully KVO, but count is not part of that, and you shouldn't use it in the way you're proposing. There is no method to set a new count, because it's just a derived property.

Ok, I was thinking something like that... Thanks for making things a bit more clear.


It's not clear to me what you're trying to do, but arrays don't magically acquire new elements, so why don't you use the method that actually adds the object to the array to handle whatever you're trying to handle? You'll just have to write a method that calls the array controller's method addObject: and have your user interface call that method instead of the addObject: method.

Well, I've been told - in this very thread - that KVO actually CAN help me achieve what I want here. I'd rather not create a new method that takes care of interface elements (I have lots of arrays and buttons etc.). But maybe it's not possible without to much hassle in this case.


Regards / Mattias
_______________________________________________
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


  • Prev by Date: [MEET] October CocoaHeads Meetings
  • Next by Date: Re: PDFDocument and PDFPage
  • Previous by thread: [MEET] October CocoaHeads Meetings
  • Next by thread: NSBorderlessWindowMask - shadows not working correctly
  • Index(es):
    • Date
    • Thread