Re: Newbie: Cannot use object as a parameter to a method -- SOLVED
Re: Newbie: Cannot use object as a parameter to a method -- SOLVED
- Subject: Re: Newbie: Cannot use object as a parameter to a method -- SOLVED
- From: "Michael S. Tashbook" <email@hidden>
- Date: Thu, 22 Apr 2004 15:29:03 -0400
Thanks to everyone for their extremely helpful (and fast!) feedback. As
I suspected, the problem was a silly error on my part; I forgot about
the fact that, in Objective-C, things have to be passed around as
pointers, not as static objects. Changing my method's return type from
(NSString) to (NSString *) eliminated the error.
I guess Java has made me soft... ;)
Mike Shields wrote:
>
it's because you have to return an NSString*, not NSString from
>
rollAsString. All ObjC classes must be pointers, not static objects
>
like C++ allows.
>
>
-Mike
_______________________________________________
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.