• 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: Variable argument lists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variable argument lists


  • Subject: Re: Variable argument lists
  • From: Jonathan Wight <email@hidden>
  • Date: Sat, 22 May 2004 11:26:45 -0400

See the stdarg man page and everything will be clear.

On May 22, 2004, at 03:22, Ken Tozier wrote:

> I'm writing a class and would like to include an initialization method
> like this one from NSDictionary:
>
> + (id) dictionaryWithObjectsAndKeys:(id) inFirst, ...
>
> But I'm not really sure how to go about it. Could someone show me what
> to do once I'm inside the initialization method?
>
> + (id) newFoo:(id) inFirst, ...
> {
> return [[[Foo alloc]
> // is this the way to pass the arguments to the init method?
> initFoo: inFirst]
> autorelease];
> }
>
> - (id) initFoo:(id) inFirst, ...
> {
> self = [super init];
> if (self)
> {
> // assuming I want to loop through the arguments
> // what should go here?
> }
> }
>
> Thanks,
>
> Ken
> _______________________________________________
> 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.

[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: 
 >Variable argument lists (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: Variable argument lists
  • Next by Date: NSTableView and NSArrayController
  • Previous by thread: Re: Variable argument lists
  • Next by thread: Re: Variable argument lists
  • Index(es):
    • Date
    • Thread