Re: Two basic questions
Re: Two basic questions
- Subject: Re: Two basic questions
- From: Markus Hitter <email@hidden>
- Date: Thu, 28 Feb 2002 17:35:45 +0100
Am Donnerstag den, 28. Februar 2002, um 16:30, schrieb David Newberry:
Acks, oops. Sorry, I meant; "returned from a function". Sorry
about that all.
In Objective-C there are no functions. Your example is a method.
I.e., you can send a [myObject myFunc]; but you can't call
myFunc; or myFunc();
- (NSString *)myFunc
{
NSMutaleString *string = [NSMutableString stringWithCapacity:0];
[string appendString:@"test"];
// You should convert to the correct type as well as take care of
// deallocation:
return [[string copy] autorelease];
return string;
}
Hope that helps,
Markus
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/
_______________________________________________
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.