• 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: Hank Heijink <email@hidden>
  • Date: Wed, 27 Sep 2006 11:40:56 -0400

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.


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.

Good luck!
Hank

_______________________________________________
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: 
 >Notification when changes occur to an array? (From: Mattias Arrelid <email@hidden>)
 >Re: Notification when changes occur to an array? (From: Mike Abdullah <email@hidden>)
 >Re: Notification when changes occur to an array? (From: Mattias Arrelid <email@hidden>)

  • Prev by Date: Re: Dragging a borderless window with a sheet displayed
  • Next by Date: Background Application Receiving Keyboard/Mouse Events
  • Previous by thread: Re: Notification when changes occur to an array?
  • Next by thread: Re: Notification when changes occur to an array?
  • Index(es):
    • Date
    • Thread