Categories Generating Warnings?
Categories Generating Warnings?
- Subject: Categories Generating Warnings?
- From: David Olbersen <email@hidden>
- Date: Fri, 11 Feb 2005 14:45:01 -0800
Hello all!
I'm trying to break out a class into several files to make development easier. To do this I'd like to use categories. Here's what I'm doing:
- Create base class (TWRobot) with an interface (TWRobot.h) and implementation file (TWRobot.m)
- Create category files based on functional chunks of code. For example TWRobot+Drawing.{h,m} to handle the code for drawing a TWRobot.
TWRobot+Drawing.h does the right thing, AFAIK:
#import "TWRobot.h"
@interface TWRobot (Drawing)
- (void) drawMyselfAsTriangle;
- (void) drawMyselfAsRobot;
- (void) drawCollisionField;
@end
TWRobot+Drawing.m does the right thing too, AFAIK:
#import "TWRobot+Drawing.h"
@implementation TWRobot (Drawing)
... various method implementations
@end
Now that those methods are defined (TWRobot+Drawing.h) and implemented (TWRobot+Drawing.m) I'd like to use them in the core class (TWRobot.m). This works, I just get a lot of compiler warnings.
All the warnings are in the form:
`TWRobot' may not respond to `<method defined in TWRobot+Drawing.h>'
cannot find method `<method defined in TWRobot+Drawing.h>'; return type of `id' assumed
So like I said, everything works: when I call the methods they're executed as they should be, I've just got these ugly warnings all over the place. Am I doing something wrong or will I just have to live with it?
--
David Olbersen
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden