• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Categories Generating Warnings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Categories Generating Warnings?
      • From: "M. Uli Kusterer" <email@hidden>
    • Re: Categories Generating Warnings?
      • From: Jason Jobe <email@hidden>
    • Re: Categories Generating Warnings?
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: Re: Xcode problem
  • Next by Date: Re: Categories Generating Warnings?
  • Previous by thread: Re: set desktop background image?
  • Next by thread: Re: Categories Generating Warnings?
  • Index(es):
    • Date
    • Thread