• 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: -observeValueForKeyPath:ofObject:change:context: only, > defined for abstract class.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -observeValueForKeyPath:ofObject:change:context: only, > defined for abstract class.


  • Subject: Re: -observeValueForKeyPath:ofObject:change:context: only, > defined for abstract class.
  • From: Todd Ransom <email@hidden>
  • Date: Sun, 8 Jan 2006 09:43:16 -0700

There is a good example of how to implement undo using KVO in Aaron Hillegass' book:

http://www.bignerdranch.com/products/cocoa1.shtml

I think it is based on NSDocument but it should be easy to adapt. Maybe one of the Apple folks can explain why the example calls super. It sounds like a documentation bug.

Todd Ransom
Return Self Software
http://returnself.com



On Jan 8, 2006, at 6:51 AM, David Burnett wrote:

email@hidden wrote:
>I have never called super in my KVO methods. All you should need to
>do is make your changes using the observed objects. What are you
>trying to accomplish when the observed objects change?

I was experimenting to see if I could use KVO to drive an undo
mechanism in a non document based application.

The reason I called super was apple example in the documentation
called super. It didn't however say what class the observer inherited
from :-) nor did it say anything about the class at the top end of the inheritance chain having to do the value setting.


Couple what with the error message referencing FlameController, that
wasn't abstract and implemented -observeValueForKeyPath, I was
on the point of abandoning Binding altogether.

Dave




_______________________________________________ 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

_______________________________________________ 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: -observeValueForKeyPath:ofObject:change:context: only, > defined for abstract class.
      • From: Scott Anguish <email@hidden>
References: 
 >Re: -observeValueForKeyPath:ofObject:change:context: only,> defined for abstract class. (From: David Burnett <email@hidden>)

  • Prev by Date: OCUnit unit tests and user defaults...
  • Next by Date: Re: Newbie cuestion on document based app and menus
  • Previous by thread: Re: -observeValueForKeyPath:ofObject:change:context: only,> defined for abstract class.
  • Next by thread: Re: -observeValueForKeyPath:ofObject:change:context: only, > defined for abstract class.
  • Index(es):
    • Date
    • Thread