[comp.sys.mac.programmer] Using "Get Info" comment field?

l4oj@vax5.cit.cornell.edu (03/28/91)

   I've written a C program for MS-DOS that I am porting to the Macintosh.
It uses some command-line arguments.  It appears that it might be possible
to grab the "Get Info" comments string, and use this as the command line.
(It took a long time of wading through "Inside the Macintosh" to figure
out where this is stored).  Of course, this is nonstandard and probably
will be impossible with System 7.0, but since the "Get Info" comments
fields are for whatever the user wants, it should work OK for the moment.
   Has anyone tried something like this?  Any problems to beware of?
Thanks,
--Doug Elrod
  (L4oj@vax5.cit.cornell.edu, L4oj@CORNELLA.BITNET)

bskendig@set.Princeton.EDU (Brian Kendig) (03/28/91)

In article <1991Mar27.220137.3664@vax5.cit.cornell.edu> l4oj@vax5.cit.cornell.edu writes:
>   I've written a C program for MS-DOS that I am porting to the Macintosh.
>It uses some command-line arguments.  It appears that it might be possible
>to grab the "Get Info" comments string, and use this as the command line.
>(It took a long time of wading through "Inside the Macintosh" to figure
>out where this is stored).  Of course, this is nonstandard and probably
>will be impossible with System 7.0, but since the "Get Info" comments
>fields are for whatever the user wants, it should work OK for the moment.
>   Has anyone tried something like this?  Any problems to beware of?

Probably much more trouble than it's worth, and terribly nonintuitive,
too.  Why not open a dialog asking for a set of parameters when the
user launches your program?  Or assume some basic parameters, and let
the user change them through menu selections?

     << Brian >>

| Brian S. Kendig      \ Macintosh |   Engineering,   | bskendig             |
| Computer Engineering |\ Thought  |  USS Enterprise  | @phoenix.Princeton.EDU
| Princeton University |_\ Police  | -= NCC-1701-D =- | @PUCC.BITNET         |
"It's not that I don't HAVE the work to *do* -- I don't DO the work I *have*."

peirce@outpost.UUCP (Michael Peirce) (03/28/91)

In article <1991Mar27.220137.3664@vax5.cit.cornell.edu>, l4oj@vax5.cit.cornell.edu writes:
> 
> 
>    I've written a C program for MS-DOS that I am porting to the Macintosh.
> It uses some command-line arguments.  It appears that it might be possible
> to grab the "Get Info" comments string, and use this as the command line.
> (It took a long time of wading through "Inside the Macintosh" to figure
> out where this is stored).  Of course, this is nonstandard and probably
> will be impossible with System 7.0, ...
          ^^^^^^^^^^^^^^^^^^^^^^^^^^

Actually System 7 supports calls to read and write the Get Info comments
without resorting to hacks.  If you can get ahold of Inside Mac Vol VI,
it's documented in there.

-- michael

--  Michael Peirce         --   outpost!peirce@claris.com
--  Peirce Software        --   Suite 301, 719 Hibiscus Place
--  Macintosh Programming  --   San Jose, California 95117
--           & Consulting  --   (408) 244-6554, AppleLink: PEIRCE