Re: Category vs Subclass
Re: Category vs Subclass
- Subject: Re: Category vs Subclass
- From: Ondra Cada <email@hidden>
- Date: Thu, 16 Aug 2001 18:48:14 +0200
Christian,
>
>>>>> Christian Mike (CM) wrote at Thu, 16 Aug 2001 11:11:40 -0500:
CM> So this leads to my question:
CM>
CM> When is it appropriate to use a Category versus a subclass?
Very, very often. Actually, whenever
(i) you don't add any property;
(ii) you don't need to call any [super something];
In fact, save the NSObject, NSView, and NSDocument, you *HARDLY EVER*
subclass anything in Cocoa.
Beware, though, method name clashes.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc