• 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 and Compiler Warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Categories and Compiler Warnings


  • Subject: Categories and Compiler Warnings
  • From: Daniel Todd Currie <email@hidden>
  • Date: Thu, 27 May 2004 23:29:32 -0700

I have added a private category of MyClass to MyClass's .m file, like so:

@implementation MyClass
[...]
@end

@interface MyClass (Private)
- (void)myPrivateMethod;
@end

@implementation MyClass (Private)
- (void) myPrivateMethod {
[...]
}
@end

The problem is that whenever I call myPrivateMethod from the public/primary MyClass implementation, I get one of those annoying "may not respond to" compiler warnings. What is the point of even having an interface if I still get warnings? Any insight would be appreciated.

Another related question... Is there any way to put IBAction methods in the private category in the .m file? When I tried this, IB was unable to find the methods to link up with them. I'd like to have as few methods as possible listed in the header.

TIAA,

-- Daniel Currie
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Categories and Compiler Warnings
      • From: Bill Cheeseman <email@hidden>
    • Re: Categories and Compiler Warnings
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Progress indicator stuck until mouse move
  • Next by Date: Re: Code Guidelines
  • Previous by thread: Progress indicator stuck until mouse move
  • Next by thread: Re: Categories and Compiler Warnings
  • Index(es):
    • Date
    • Thread