Re: KeyValue Observing rant
Re: KeyValue Observing rant
- Subject: Re: KeyValue Observing rant
- From: Scott Anguish <email@hidden>
- Date: Mon, 26 Apr 2004 13:55:12 -0400
On Apr 26, 2004, at 6:19 AM, Michael Keller wrote:
following the initial discussion about Cocoa's "Controller" or
"Bindings" architecture it seems that I'm not the only one to be a
"little angry".
If you're referring to Aaron's posting back in October, I think you
should read the follow-up.
What really worse about it is that one (ore more) Apple engineers
stated that they make a "clever" use of Objective-C by posing a
NSNotifying_nameOfOriginalClass when an instance of original class is
being observed.
That's not "clever". it allows all objects, regardless of their
implementing accessor methods or the new KVO methods, to support KVO
automatically. It certainly wasn't done to save 2 lines of code in
every appkit class.
Well it saves two lines of code in every set-accessor, thats seems to
be fine firsthand.
That is a fine demonstration of how flexible Objective-C is.
But one of those "little" drawbacks is, that so basic things like
-description won't work anymore.
a bug. Also, I think it has a bit of an indication that -description
is perhaps being used in cases where it shouldn't be. I think
primarily it's a debugging aid, and too often it's being used in other
ways.
Also, I'm not entirely sure that description returning the method in
those cases is entirely inappropriate. Perhaps it should return both
with a note that it's being observed.
Was there ANY quality assurance at Apple before releasing this?
of course.
But I'm ranting because this hidden posing or on-the-fly changing of
the isa is not documented and it limits other code (like plugins)
doing it too.
Ah. Ok. So, the first issue is taken care of. And has been since it
became evident that developers needed that information. It had been
clearly stated at WWDC last year how this was being done, so that
information was out there.
As for it limiting other code from doing it. isa-swizzling isn't
recommended for external developers. And I don't think there is
anything that you couldn't do even to an isa-swizzled class, including
doing it again.
low level stuff like this is done in the Apple frameworks all the time.
You're not really loosing anything by Apple doing this.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.