On Apr 18, 2008, at 2:56 PM, K. Darcy Otto wrote:
The only reason to subclass Deduction (with SDeduction) and then
DeductionLine (with SDeductionLine) is to get an SDependency
object. Is there an easier way? I suppose I could just copy the
Dependency class files and then modify it for this particular
project; but I was hoping for a different way. Thanks.
I think that what you would typically do is either to add:
"-[DeductionLine initWithDependency:]"
// Where Deduction line doesn't know, or care about, what particular
// type of object is being passed, as long as it is either a subclass
of
// Dependency, or it conforms to a specific protocol.
Or something like:
"-[DeductionLine initWithProperty:]"
// Where the caller doesn't know about different Dependency classes,
// and instead specify some type of configuration / context property,
to
// which the DeductionLine responds by instantiating an appropriate
// Dependency subclass.
j o a r
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]