Re: Looking for Cocoa source code
Re: Looking for Cocoa source code
- Subject: Re: Looking for Cocoa source code
- From: Lance Bland <email@hidden>
- Date: Thu, 6 Mar 2003 14:31:57 -0500
On Thursday, March 6, 2003, at 02:07 PM, David Remahl wrote:
>
No, because it is subject to change. What if the primary method in the
>
next release of cocoa is changed? So that setFrame: no longer calls
>
setFrameOrigin:? You can only trust setFrame: to call setFrameOrigin:
>
if it is documented to do so.
Ideally that would be true. But, when push comes to shove you got to do
what you got to do. Knowledge of the implementation is required to
subclass correctly in this case.
>
File a bug on the documentation or the framework, or both, if you
>
would like Apple to say this in the future. But I don't think it is
>
necessary, since overriding those methods in almost all cases can be
>
solved using a delegate or notifications. So, if you do need to
>
override them, you should override all of them at this point (and
>
override setFrame: to call setFrameOrigin: and setFrameSize:).
To a point, I agree, but using delegates and notifications produces a
different result from subclassing. The three ways of doing things are
at some point exclusive of each other, although there is also
overlapping. If Apple didn't want people to subclass the methods then
they shouldn't have made them part of the public API.
-lance
------------------------------------
Lance Bland
mailto:email@hidden
VVI Is The #1 Visual-Report Tool Developer For Mac OS X
http://www.vvi.com
_______________________________________________
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.