Re: Categories overriding methods
Re: Categories overriding methods
- Subject: Re: Categories overriding methods
- From: Ondra Cada <email@hidden>
- Date: Fri, 2 Aug 2002 17:20:48 +0200
On Friday, August 2, 2002, at 06:06 , David Newberry wrote:
I am thinking about using a category to over-ride a class's init: method
to return a subclass of that class. (Make sense? :) My question is
basically, is that OK?
In case you wanna trash the original init altogehter (never to be called
in any condition), then it's all right.
Is this... reasonable code? The reason I want to do this is because I
want code that's already wired to create instances of MyClass to instead
create instances of MySubclass without fiddling with the existing code.
In this case -- and presuming there is no older code which depends on the
original init -- it would work (most probably ;)). It is slightly strange
though; would you not rather want to poseAsClass: the subclass entirely?
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.