Re: Categories give warning
Re: Categories give warning
- Subject: Re: Categories give warning
- From: Glen Simmons <email@hidden>
- Date: Fri, 1 Jul 2005 18:45:31 -0500
On Jul 1, 2005, at 5:07 PM, Zac Tolley wrote:
ok I have a strange question.
I'm working my way through a book on Cocoa, cool book.
The chapter on categories shows how to add a method to NSString.
In my project I add the category and compile it and get warnings
that the method may not respond.
I run the project, it runs fine....
I downloaded a copy of the project from the authors site. Compile
it, no warnings. I cut and paste his code into my project, and it
still gives the warnings.
Is there anything in a project setup or anywhere that has changed
sinse 2.0? I think the project I downloaded was 2.0 format and had
to convert it.
In the file where you call your new method, you need to include the
header that defines your new method.
i.e.
#import "MyNSStringCategory.h"
HTH,
Glen
_______________________________________________
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