• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newbie: Cannot use object as a parameter to a method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie: Cannot use object as a parameter to a method


  • Subject: Re: Newbie: Cannot use object as a parameter to a method
  • From: Nicko van Someren <email@hidden>
  • Date: Thu, 22 Apr 2004 19:27:10 +0100

On 22 Apr 2004, at 19:07, 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.

Nicko
_______________________________________________
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.


  • Follow-Ups:
    • Re: Newbie: Cannot use object as a parameter to a method
      • From: "Michael S. Tashbook" <email@hidden>
    • Re: Newbie: Cannot use object as a parameter to a method
      • From: "Michael S. Tashbook" <email@hidden>
References: 
 >Newbie: Cannot use object as a parameter to a method (From: "Michael S. Tashbook" <email@hidden>)

  • Prev by Date: Newbie: Cannot use object as a parameter to a method
  • Next by Date: Re: Newbie: Cannot use object as a parameter to a method
  • Previous by thread: Newbie: Cannot use object as a parameter to a method
  • Next by thread: Re: Newbie: Cannot use object as a parameter to a method
  • Index(es):
    • Date
    • Thread