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: Ondra Cada <email@hidden>
- Date: Thu, 22 Apr 2004 21:40:16 +0200
Michael,
On 22.4.2004, at 21:04, Michael S. Tashbook wrote:
>
- (NSString)rollAsString;
Object values need to be declared as class pointers. Namely in this
case, you wanted
-(NSString*)rollAsString;
>
NSLog(@"Rolled a %d.\n", currValue);
This is pretty unimportant, but you don't need to use \n. NSLog does it
automatically.
>
- (NSString)rollAsString
>
{ // XCode reports the error here
Same as above, "...(NSString*)..." should cure the problem.
Otherwise, the code looks all right.
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.