Re: A quick one: Passing a reference/pointer to NSString
Re: A quick one: Passing a reference/pointer to NSString
- Subject: Re: A quick one: Passing a reference/pointer to NSString
- From: Jeff Brown <email@hidden>
- Date: Tue, 22 Jul 2008 18:49:12 -0700 (PDT)
Sorry - it should have been:
- (void) aMethod
{
NSString* string1 = @"";
NSString* string2 = @"";
string1 = [self foo:string2];
}
- (NSString*) foo:(NSString*)aString
{
NSString* stringA = @"Hi there";
NSString* stringB = @"Everyone";
aString = stringB;
return stringA;
}
I need to get 2 strings back from foo. I can get foo to return one. I need to pass the other one in by reference. It seems that since I'm passing a pointer to an NSString as the argument, it should be fine but it's not.
By the way
How do you reply on this mailing list so that the reply remains part of the thread?
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