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: lbland <email@hidden>
- Date: Thu, 22 Apr 2004 15:19:20 -0400
hi-
take this line out of your code:
- (NSString)rollAsInt
you aren't using C++ anymore...
thanks!-
-lance
On Apr 22, 2004, at 2:37 PM, Michael S. Tashbook wrote:
I'm trying to create a simple class that represents a six-sided die.
XCode keeps complaining about my rollAsInt method, which is just
supposed to return the value of the currValue instance variable (the
code below omits a similar method that returns the value as an
NSString,
which gives the same error message).
....
- (int)rollAsInt
{
return currValue; // This is where XCode complains of an error
}
Go on, give us a clue... what's the error message? :-)
Seriously, I just cut and pasted the code you wrote into a pair a
files
and it compiles fine for me. It's a little hard for us to know what
the illness is likely to be if you don't tell us what the symptoms
are.
Sorry about that. The error message was contained in the message
subject:
"Can not use an object as parameter to a method"
As I said before, I can't see why XCode is complaining. The fact that
you can get it to compile with nary a peep from the compiler is all the
more puzzling.
Thanks for any explanation you can provide...
Lance Bland
mailto:email@hidden
VVI
888-VVI-PLOT
http://www.vvi.com
_______________________________________________
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.