• 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
A quick one: Passing a reference/pointer to NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A quick one: Passing a reference/pointer to NSString


  • Subject: A quick one: Passing a reference/pointer to NSString
  • From: Jeff Brown <email@hidden>
  • Date: Tue, 22 Jul 2008 18:33:55 -0700 (PDT)

Hi Guys

What do I need to do in the following code to get theString to take the value I'm giving it in foo i.e. "Hi there"?

- (void) aMethod
{
    NSString* theString = @"";
    [self foo:theString];
}

- (NSString*) foo:(NSString*)aString
{
    NSString* stringB = @"Hi there";
    aString = stringB;
}

Thanks guys.


      Start at the new Yahoo!7 for a better online experience. www.yahoo7.com.au
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: A quick one: Passing a reference/pointer to NSString
      • From: Ken Thomases <email@hidden>
    • Re: A quick one: Passing a reference/pointer to NSString
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: Problem on clearing points and paths on a NSView
  • Next by Date: Re: A quick one: Passing a reference/pointer to NSString
  • Previous by thread: Re: PropertyList -> NSBrowser / NSOutlineView?
  • Next by thread: Re: A quick one: Passing a reference/pointer to NSString
  • Index(es):
    • Date
    • Thread