• 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: Two basic questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Two basic questions
      • From: Ondra Cada <email@hidden>
References: 
 >Re: Two basic questions (From: David Newberry <email@hidden>)

  • Prev by Date: Re:[cocoa-dev] How can I hide an NSView properly?
  • Next by Date: Re: Problems adding horiz scrollbar to NSTextView
  • Previous by thread: Re: Two basic questions
  • Next by thread: Re: Two basic questions
  • Index(es):
    • Date
    • Thread