KVO and the description method
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