newbie: OS X and answer file ?

Jeanne A. E. DeVoto jeanne at runrev.com
Wed Jun 4 02:18:44 EDT 2003


At 8:31PM -0700 6/3/03, Dar Scott wrote:
>>> Probably the engine needs to be updated to look at both extensions 
>>> and types for OS X files.
>
>I like it.  Maybe this can apply to all files, not just to OS X files.  
>On some systems the extension or the type is simply ignored.

It would only apply to Mac OS and OS X, I suppose, because Unix and
Windows don't have the concept of a file type.

I think previous posters have correctly identified the problem - OS X
applications don't all set file types, and OS X recommendations have
been kind of schizophrenic about the whole type-vs-extension thing,
so you can't necessarily expect consistently-set file types. (Although
in my opinion any well-behaved application ought to set them correctly.)

A while ago I suggested a syntax extension to answer file to allow 
specifying one or more of either or both type and extension:

------
  answer file prompt [{with|of} fileSpecList]

<fileSpecList> = <fileSpec> | <fileSpecList> or <fileSpec>
<fileSpec> = extension <extString> | type <typeString>

Specifications are one of two types: a filetype (or set of types, for
backward compatibility) or an extension. Anything following "of type" is
parsed 4 characters at a time until you run out, and used as a filetype.
Anything following "with extension" is treated more or less the same way as
the Unix form. You can have as many of these specifications as you want in
the statement, separated by "or".

Example:
  answer file "Hello" of type "JPEGPICT" -- as now
  answer file "Hello Again" of type "JPEG" or type "PICT" -- equivalent
  answer file "Goodbye" with extension "*.jpeg" or extension "*.pict"
  answer file "You again?" of type "JPEG" or extension "*.jpg" or extension ".jpeg"

--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - Software at the Speed of Thought
http://www.runrev.com/





More information about the use-livecode mailing list