NSApplicationMain arguments
NSApplicationMain arguments
- Subject: NSApplicationMain arguments
- From: email@hidden
- Date: Sat, 12 Apr 2008 04:01:19 +0200
Hi,
I'm trying to add some launch arguments to my executable by modifying
the arguments passed to main.m, but find that the new arguments are
completely ignored. No matter what I pass to NSApplicationMain the
executable launches with the same old default argsv[]. Is this not the
right approach? Should I rather subclass NSApplication? If so, how?
Any help appreciated. Thanks.
int main(int argc, char *argv[])
{
int new_argc = 2;
char* arg1 = argv[0];
char *new_argv[] = { arg1, "foo", "bar", NULL };
return NSApplicationMain(new_argc, (const char **) new_argv);
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden