I for one had no idea that existed.
-Daniel
On Jul 21, 2010, at 8:03 AM, Alastair Houghton wrote:
On 21 Jul 2010, at 15:54, Fritz Anderson wrote:
I'm writing a Foundation tool that will take both options and
pathname arguments.
If you use NSUserDefaults, you can handle key-value options (-
threshold 17) pretty easily, but this has limitations. I don't see
how it can be graceful for
* Two-hyphen options (chatty --verbose).
* Non-value options (ls -a).
* Single-item key-value options (chatty --verbose=3 -or- chatty -v3).
* Concatenated options (ls -al)
[snip]
Maybe I'm missing something, but why not just use getopt_long()?
That does the parsing for you, and matches what other programs on
the system do.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com