• 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: NSDocument and KVO compliance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument and KVO compliance


  • Subject: Re: NSDocument and KVO compliance
  • From: "email@hidden" <email@hidden>
  • Date: Mon, 21 Oct 2013 11:58:03 +0100

On 21 Oct 2013, at 06:01, Seth Willits <email@hidden> wrote:

> On Oct 19, 2013, at 9:27 AM, Jerry Krinock wrote:
>
>> That's interesting and I've never seen it done.
>>
>> I'd call it a variation of writing custom accessors for each attribute.  Custom accessors for each attribute have the advantage of reliably catching all model changes, not just those driven by Cocoa Bindings.  But your technique is way less code, by a factor of the number of attributes, and requires zero maintenance.
>
> I've done it / do it in one particular project in one spot out of notable convenience. It works, but only for modifications using KVC, and I do recall having at least one bug where a modification wasn't using KVC and wasn't triggering the code I was expecting it to.
>
Yes. You need to keep your wits about you with this sort of thing.

> I gag a little whenever I remember that's how it works, but at this point it ain't broke so I'm not going to tempt fate by fixing it. ;-)
>
What would you suggest as a possible fix?

Jonathan
_______________________________________________

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


  • Follow-Ups:
    • Re: NSDocument and KVO compliance
      • From: Seth Willits <email@hidden>
References: 
 >NSDocument and KVO compliance (From: "email@hidden" <email@hidden>)
 >Re: NSDocument and KVO compliance (From: Seth Willits <email@hidden>)
 >Re: NSDocument and KVO compliance (From: Kevin Perry <email@hidden>)
 >Re: NSDocument and KVO compliance (From: Jerry Krinock <email@hidden>)
 >Re: NSDocument and KVO compliance (From: "email@hidden" <email@hidden>)
 >Re: NSDocument and KVO compliance (From: Jerry Krinock <email@hidden>)
 >Re: NSDocument and KVO compliance (From: Seth Willits <email@hidden>)

  • Prev by Date: Re: NSDocument and KVO compliance
  • Next by Date: Re: NSPopUpButton binding value/selected problem
  • Previous by thread: Re: NSDocument and KVO compliance
  • Next by thread: Re: NSDocument and KVO compliance
  • Index(es):
    • Date
    • Thread