Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to pass cmd line arguments to my carbon app?



On Sep 23, 2005, at 2:07 AM, Jay Vaughan wrote:

why is it you associate "Unix" with "command line user"? i think this is quite a bit braindead. Unix is not the command line. Unix does GUI too, yo.

I've been a Unix user since the 80's. GUI's are for sissies. Give me emacs shell-mode! :-)/2


I just have to take a moment to note that I find this whole conversation surreal.

I'm finding it strange to think that "the Unix way" is now officially some sort of GUI panel that stores static command options. What percentage of the Unix market is that, I wonder? What happened to good old scripts, aliases, environment variables and config files? Or, heck, just typing the command and options into the shell?

It seems weird to me to claim that something other than the command line is "standard" for Unix while claiming that Mac OS X is somehow the odd one out. I think of anything other than environment variables and config files as platform-specific when discussing Unix programs.

That's me with my Unix hat on. Here's me with my Mac hat on:

The Official Rules™ for Designing Mac Software:

1. Never require the user to modify the executable or anything in an application bundle. They should be read-only for security and for the widest compatibility (some common system setups make all programs read-only). If you want to store user-editable, static settings, place them in a user-writable file in a Preferences folder in the appropriate domain(s).

2. If you have persistent settings and a graphical UI, provide access to the settings via a Preferences dialog. There's no sense in hiding them when there's a perfectly standard place for them.

3. If you want to statically store settings and pass them to main(), write a wrapper script or executable that reads them from a preferences file or configuration file(s) and then execs the target program, passing along the options.

After some consideration, I think it might be handy if Mac OS X did something similar to Windows, where there'd be a command argument field in the Info window for aliases which point at executables. It wouldn't do this for executables themselves, though--programs should be immutable. In a shell, you wrap a set of options up with a command by "wrapping" it with an alias or script. Keep that separation. Let users create aliases to set options.

-- Chris, Official Arbiter of All Things Mac and Unix

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: How to pass cmd line arguments to my carbon app? (From: Jay Vaughan <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Chris Espinosa <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Jay Vaughan <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Eric Schlegel <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Chris Espinosa <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Jay Vaughan <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Lyndsey Ferguson <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Jay Vaughan <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Lyndsey Ferguson <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Jay Vaughan <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Rosyna <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Jay Vaughan <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Rosyna <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Jay Vaughan <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Rosyna <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Jay Vaughan <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.