Re: Variable argument lists
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.