• 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: "Michael S. Tashbook" <email@hidden>
  • Date: Thu, 22 Apr 2004 14:37:08 -0400

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

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

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.


References: 
 >Re: Newbie: Cannot use object as a parameter to a method (From: Nicko van Someren <email@hidden>)

  • Prev by Date: Re: Newbie: Cannot use object as a parameter to a method
  • Next by Date: Loading/Unloading a Cocoa-using framework from a CFM application
  • Previous by thread: Re: 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