On Jul 31, 2008, at 4:14 PM, Mark Sanvitale wrote:

I think I am doing exactly what you say is necessary (i.e. declare the second method in the superclass's public interface).

Here are some code snippets:

Turning your code snippets into a test program, I can't reproduce that compiler warning, or in a trivial test where the superclass declares/ implements copyWithZone: and the subclass declares conformance. If this works for you, what did I miss?


// File test.m, compile & run with `cc test.m -framework Foundation -o test && ./test`
#import <Foundation/Foundation.h>

@protocol PortalTabProtocol
- (void)refreshDisplay:(id)capture because:(int)trigger;
@end

@interface PortalTabView : NSObject <PortalTabProtocol>
- (NSString *)tabName;
- (void)refreshDisplay:(id)capture because:(int)trigger;
- (id)displayCapture;
@end

@protocol ReadArchiveClient
- (id)displayCapture;
- (void)processedArchive:(id)archive;
@end

@interface PortalActionView : PortalTabView <ReadArchiveClient>
@end

@implementation PortalTabView

- (NSString *)tabName; { return nil; }
- (void)refreshDisplay:(id)capture because:(int)trigger; {}
- (id)displayCapture; { return nil; }

@end

@implementation PortalActionView

- (void)processedArchive:(id)archive {}

@end

int main (int argc, char const *argv[])
{
    NSAutoreleasePool *pool = [NSAutoreleasePool new];

    id obj = [[PortalActionView alloc] init];
    if ([obj conformsToProtocol:@protocol(ReadArchiveClient)])
        NSLog(@"PortalActionView conforms");
    else
        NSLog(@"PortalActionView does not conform");

    [pool release];
    return 0;
}

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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]

Reply via email to