Re: Newbie: Cannot use object as a parameter to a method
Re: Newbie: Cannot use object as a parameter to a method
- Subject: Re: Newbie: Cannot use object as a parameter to a method
- From: Glenn Andreas <email@hidden>
- Date: Thu, 22 Apr 2004 14:33:44 -0500
As a side note, XCode also reports that rollAsString has an incompatible
return type. According to the O'Reilly book, the @"" form should
automatically create an NSString object, which is what the method is
declared to return. Did I miss a memo somewhere? ;)
Yes.
Any ideas?
[snip]
- (NSString)rollAsString;
This should be (NSString *) since you are returning a _pointer_ to an object.
- (NSString)rollAsString
Again (NSString *) and everything should be fine (if there were
"stack based objects" for Objective C, this might work, but there
aren't, and thus this doesn't).
--
Glenn Andreas email@hidden
mondo blobbo, Cythera, Theldrow, oh my!
Mad, Bad, and Dangerous to Know
_______________________________________________
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.