• 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: Ondra Cada <email@hidden>
  • Date: Thu, 28 Feb 2002 18:48:30 +0100

Markus,

>>>>>> Markus Hitter (MH) wrote at Thu, 28 Feb 2002 17:35:45 +0100:
MH> >Acks, oops. Sorry, I meant; "returned from a function". Sorry
MH> >about that all.
MH>
MH> In Objective-C there are no functions.

Sorry, but that's not true. There's as many of functions as your heart like,
and some of them even in the standard Cocoa API. Don't forget that ObjC is a
superset of C.

MH> >- (NSString *)myFunc
MH> >{
MH> >NSMutaleString *string = [NSMutableString stringWithCapacity:0];
MH> >[string appendString:@"test"];
MH>
MH> // You should convert to the correct type as well as take care of
MH> // deallocation:
MH>
MH> return [[string copy] autorelease];

Not necessarily; it depends on context. The original code was all right.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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.

References: 
 >Re: Two basic questions (From: Markus Hitter <email@hidden>)

  • Prev by Date: Font Trait Problem
  • Next by Date: Creating and managing an inspector
  • Previous by thread: Re: Two basic questions
  • Next by thread: Re: Two basic questions
  • Index(es):
    • Date
    • Thread