• 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: Kevin Perry <email@hidden>
  • Date: Fri, 18 Oct 2013 12:13:56 -0700

If you wanted to try this, you should also override -updateChangeCountWithToken:forSaveOperation:, which is used to decrement change counts after saving.

I expect this would get you 99% of the way, but as Seth said, don't expect it to be bulletproof.

On Oct 18, 2013, at 11:49 AM, Seth Willits <email@hidden> wrote:

> On Oct 18, 2013, at 11:41 AM, email@hidden wrote:
>
>> Twice recently I have found myself tinkering with NSDocument et al to support observing of certain values.
>> For example, NSDocument -isDocumentEdited is not seemingly KVO compliant.
>> -isDocumentEdited status is driven by -updateChangeCount: so
>>
>> ...
>>
>> Is this the best way to go about addressing these sorts of issues with regard to missing KVO compliance?
>
> Well, the best thing to do is file a radar and wait a couple years for them to get around to adding it. :(
>
> That said, it would probably mostly work, but it's not always guaranteed to be bulletproof because those keys could also be influenced by private methods.
>
>
> --
> Seth Willits
>
>
>
>
> _______________________________________________
>
> 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


_______________________________________________

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: Jerry Krinock <email@hidden>
References: 
 >NSDocument and KVO compliance (From: "email@hidden" <email@hidden>)
 >Re: NSDocument and KVO compliance (From: Seth Willits <email@hidden>)

  • Prev by Date: Re: NSDocument and KVO compliance
  • Next by Date: Re: Core Data with ODBC databases?
  • Previous by thread: Re: NSDocument and KVO compliance
  • Next by thread: Re: NSDocument and KVO compliance
  • Index(es):
    • Date
    • Thread