Re: Informing one class about another class's methods
Re: Informing one class about another class's methods
- Subject: Re: Informing one class about another class's methods
- From: j o a r <email@hidden>
- Date: Thu, 23 Aug 2007 13:53:37 +0200
On 23 aug 2007, at 13.45, Roland Silver wrote:
Suppose this:
1. Sub is a subclass of Super, hence it has a <#include "Super.h">;
2. Sub defines the method sub;
3. Super defines a method whose code contains the message: [Sub sub].
How can I get Super to know about Sub's sub method? Having a
<#include "Sub.h"> in Super.m causes a compiler error, while
<@class Sub;> tells Super that there's a Sub class, but nothing
about its methods.
Using protocols somehow? But I don't want to implement the sub
method in Super, I just want to let Super know about it.
That sounds a bit weird. Please describe the original problem you're
trying to solve, rather than the secondary problem with your
solution. It might be that there is a different way to tackle your
original problem.
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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