• 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: KVO one-step listening but two-step notifying?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: KVO one-step listening but two-step notifying?


  • Subject: Re: KVO one-step listening but two-step notifying?
  • From: Daniel Jalkut <email@hidden>
  • Date: Fri, 23 Dec 2005 00:56:10 -0500

Hmm - I'm confused. What's the distinction between:

1. It's OK to to invoke will/didChange without a change actually happening (just inefficient).
2. Not alright to invoke *both* after a change has occurred (to tickle).

I'm assuming that *both* in the second essentially means "will/ didChange". If it's OK to do when nothing has happened, how can it be wrong (dangerous, not just inefficient) to do so some time after a change has already occurred? Isn't that the same (safety-wise) as "nothing has happened"?

I'm acutely interested because I might have some lurking bugs in my code that need to be addressed.

Daniel

On Dec 22, 2005, at 8:34 PM, mmalcolm crawford wrote:


On Dec 22, 2005, at 5:22 PM, Daniel Jalkut wrote:

I think mmalcom's gut feeling that you should design things in term of dependent objects is probably wise. But I have gotten away with "blank" will/did-change combos, and I assume they must be safe. It's not up to the observer to decide how I change the values they are observing.

As noted in my original reply, invoking will/didChange without a change actually happening is alright (just inefficient). What is *not* alright is to invoke *both* methods *after a change has already occurred* (i.e. to "tickle" a bindings update). At some stage, this will cause a problem...

mmalc

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com

This email sent to email@hidden

_______________________________________________
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
  • Follow-Ups:
    • Re: KVO one-step listening but two-step notifying?
      • From: mmalcolm crawford <email@hidden>
References: 
 >KVO one-step listening but two-step notifying? (From: Hamish Allan <email@hidden>)
 >Re: KVO one-step listening but two-step notifying? (From: mmalcolm crawford <email@hidden>)
 >Re: KVO one-step listening but two-step notifying? (From: Daniel Jalkut <email@hidden>)
 >Re: KVO one-step listening but two-step notifying? (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Get all open files of one process
  • Next by Date: Keyboard Localizations
  • Previous by thread: Re: KVO one-step listening but two-step notifying?
  • Next by thread: Re: KVO one-step listening but two-step notifying?
  • Index(es):
    • Date
    • Thread