• 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
KVO and the description method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

KVO and the description method


  • Subject: KVO and the description method
  • From: Ed Baskerville <email@hidden>
  • Date: Tue, 1 Mar 2005 22:17:20 -0800

Hi all,

I noticed that as soon as I begin observing an object via KVO, calling the description method on the observed object no longer works as expected. Instead of calling the description method implemented by my class, it seems that NSObject's version of description is called, which returns something like:

<MyClass: 0x37a750>

I assume this has something to do with the "isa-swizzling" that's happening under the hood to replace the implemented accessor methods with KVO-notifying accessor methods, but I wasn't expecting the description method to be redirected as well.

For now, I'm using a new method to return a string description, but it's annoying not to be able to just dump a dictionary and all its contents using [dict description] and get useful information, not just memory locations.

I assume this was implemented intentionally for KVO debugging purposes. Was it left on intentionally in the shipping code? Should I file a bug?

--Ed

_______________________________________________
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 and the description method
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Memory management question (passing objects to method)
  • Next by Date: Re: KVO and the description method
  • Previous by thread: Re: progressIndicator in cocoa
  • Next by thread: Re: KVO and the description method
  • Index(es):
    • Date
    • Thread