Re: NSLog to a file?
Re: NSLog to a file?
- Subject: Re: NSLog to a file?
- From: Ondra Cada <email@hidden>
- Date: Fri, 3 May 2002 13:53:21 +0200
On Friday, May 3, 2002, at 08:12 , Angela Brett wrote:
I have read a bit about writing functions with variable numbers of
arguments but I don't know how to just pass all the arguments into a
method like stringWithFormat:.
Actually, I think too that redirecting the tool output is the proper
solution of what you need. If you insisted though -- or in a different
situation -- it is quite easy:
void MyLog(NSString *format,...) {
va_list a;
NSString *s;
va_start(a,format);
s=[[[NSString alloc] initWithFormat:format arguments:a] autorelease];
va_end(a);
... whatever with s ...
}
---
Ondra Hada
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.