Re: Changing Pointers Dynamically and Build Warnings
Re: Changing Pointers Dynamically and Build Warnings
- Subject: Re: Changing Pointers Dynamically and Build Warnings
- From: David Remahl <email@hidden>
- Date: Sun, 26 Jan 2003 11:51:23 +0100
In fact, simply importing MyCustomClass.h will do it - even if myObject
is typed id, since the compiler will then know that there is at least
one object type that would respond to the message you are trying to
send. Explicit typing could still be a good idea, though, since it will
force you to import the header.
/ Rgds, David Remahl
On Sunday, January 26, 2003, at 11:42 AM, j o a r wrote:
2) Often in my code I'm trying to communicate between classes, and I
instantiate the class via Interface Builder and connect them via
outlets. Then I can just call routines from the other classes by
using the outlet. However, Project Builder issues warnings that the
class does not respond to the subroutines that I want to call -- when
I actually run the program, it works as I think it should, and so the
warning does not apply. I would like to get rid of the warnings
anyway, though... how would I do that?
You should / could use typed outlets to avoid this problem. For
example, instead of:
id myObject;
use:
IBOutlet MyCustomClass *myObject;
_______________________________________________
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.