• 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 -- SOLVED
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: Re: Newbie: Cannot use object as a parameter to a method -- SOLVED
  • From: "Michael S. Tashbook" <email@hidden>
  • Date: Thu, 22 Apr 2004 15:29:03 -0400

Thanks to everyone for their extremely helpful (and fast!) feedback. As
I suspected, the problem was a silly error on my part; I forgot about
the fact that, in Objective-C, things have to be passed around as
pointers, not as static objects. Changing my method's return type from
(NSString) to (NSString *) eliminated the error.

I guess Java has made me soft... ;)

Mike Shields wrote:

> it's because you have to return an NSString*, not NSString from
> rollAsString. All ObjC classes must be pointers, not static objects
> like C++ allows.
>
> -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.


  • Prev by Date: Re: 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: Re: Loading/Unloading a Cocoa-using framework from a CFM application
  • Next by thread: NSData object trouble with <16KB
  • Index(es):
    • Date
    • Thread