• 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: Objective-C default arguments??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-C default arguments??


  • Subject: Re: Objective-C default arguments??
  • From: Clark Cox <email@hidden>
  • Date: Sat, 1 Nov 2003 12:13:18 -0500

On Nov 01, 2003, at 02:18, Malcolm Sharman wrote:

> I just realised that I'm thinking in C++ rather than plain C, so it
> that
> regard it won't work.
>
> I also realised that there is a way to do what I want to do nearly as
> easily.
>
> Instead of -(void)initWithFile:(NSString *)path=@""
> setmovie:(BOOL)setMovie=NO;
>
> I use
> -(void)initWithFile:(NSString *)path setMovie:(BOOL)setMovie
> And
> -(void)initWithFile:(NSString *)path
> {
> [self initWithFile:path setMovie:NO];
> }
>
> It is kind of a hack, but it works.

That's not a hack at all. That's the recommended way of doing exactly
what you want.

--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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: Objective-C default arguments?? (From: Malcolm Sharman <email@hidden>)

  • Prev by Date: Re: Variables: Why one way and not another?
  • Next by Date: Help find doc on error messages
  • Previous by thread: Re: Objective-C default arguments??
  • Next by thread: Re: Objective-C default arguments??
  • Index(es):
    • Date
    • Thread