Re: Forwarding messages to another class
Re: Forwarding messages to another class
- Subject: Re: Forwarding messages to another class
- From: Graham Cox <email@hidden>
- Date: Sun, 07 Jun 2015 09:58:07 +1000
> On 7 Jun 2015, at 8:47 am, Cosmo <email@hidden> wrote:
>
> I should have explained that I’m calling these methods on instances of the superclass, not the subclass, so inheritance doesn’t work.
But you have written class methods, so instances doesn’t come into it. Seems possible that there’s a fundamental misunderstanding involved here.
What you’ve described (a base class that provides a generic interface, with specific implementations in subclasses) is eminently doable - in fact largely the entire point of object-oriented programming - but perhaps you should simply be doing this using straightforward instance methods, not class methods?
—Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden