• 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: NSArrayController and threading
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController and threading


  • Subject: Re: NSArrayController and threading
  • From: mmalcolm crawford <email@hidden>
  • Date: Wed, 22 Dec 2004 15:41:15 -0800


On Dec 22, 2004, at 3:26 PM, mmalcolm crawford wrote:

	Record	*rec = [_recordList objectAtIndex: [indexes firstIndex]];
	[rec willChangeValueForKey: @"thumbnail"];
	[rec didChangeValueForKey: @"thumbnail"];

You would be better off ensuring that the record sends its own notifications when the thumbnail actually changes.

To elaborate:
One issue here in particular is that the value of 'thumbnail' will be the same for the calls to will- and didChange... Any part of the system that depends on these values being different will "fail". (It's not unreasonable to expect the KVO mechanism to cache values where it can, and only send notifications if a change is actually made...)


mmalc
_______________________________________________
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: 
 >NSArrayController and threading (From: Joe Chan <email@hidden>)
 >Re: NSArrayController and threading (From: "John C. Randolph" <email@hidden>)
 >Re: NSArrayController and threading (From: Joe Chan <email@hidden>)
 >Re: NSArrayController and threading (From: "John C. Randolph" <email@hidden>)
 >Re: NSArrayController and threading (From: Joe Chan <email@hidden>)
 >Re: NSArrayController and threading (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: NSArrayController and threading
  • Next by Date: decimal floating formatting question
  • Previous by thread: Re: NSArrayController and threading
  • Next by thread: Weird NSPopUpButton behaviour
  • Index(es):
    • Date
    • Thread