🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #44887

Re: Text file madness on the Mac.

#44887
From: Herb Poppe
Date: Sat, 06 Jan 1990 00:39
77 lines
4192 bytes
In article <1998@eric.mpr.ca> hui@joplin.mpr.ca writes:
>In article <5900@ncar.ucar.edu> hpoppe@bierstadt.UCAR.EDU (Herb Poppe) writes:
>>
>>Speak for yourself.
>>
>>A feature of the Versaterm terminal emulation program allows one to set
>>the creator string for the TEXT files it produces. All such files can
>>then be displayed by simply double clicking on them from the desktop.
>
>Really? What program's creator code should I insert? Wouldn't the
>program then assume the file is in its internal format and generate
>interesting results?
>
>Michael Hui  604-985-6506 604-985-4214  hui@joplin.mpr.ca

A little background first:

Every file has associated with it two four-character strings. One string
is the CREATOR and the other is the TYPE. Unless you use programmer's
tools like ResEdit or disk utilities like MacTools you never see these
strings; the Finder doesn't show them to you.

For an application, the type must be APPL (otherwise is isn't an
application). The creator string for an application contains the
applications "signature". The signature for Microsoft Word 3.x and 4.0
is MSWD.

There may be zero or more (different) document types associated with an
application. The creator string for each document type is the application
signature. All MS Word 3.x and 4.0 documents have the creator string
MSWD. (Word 3.x can also create Word 1.x word processing documents that
have the creator string WORD as well as MacWrite documents that
have the creator string MACA.)
Each different document type has a different type string. Word 3.x
has many different document types: a help file (WHLP), glossaries (GLOS),
spelling dictionaries (DICT), hyphenation file (WPRD), as well as word
processing files (WDBN) and a straight text files (TEXT).

From the Finder, you can select one or more files and double-click
on one of them. If they all have the same creator string, the Finder
will launch the application (APPL) with that creator string and
pass the application a list of the files with their corresponding
type strings. It is up to the application to do "the right thing" with
each file.

When VersaTerm creates a text file, the file is given the type string TEXT.
Selecting "Extras..." under the Settings menu presents a dialog box
where you can select the creator string; indirectly by clicking on
a radio button associated with a popular word processor or text editor
(Word 3.0, QUED, MacWrite, etc.) or directly by entering the creator string
in an edit-text box.

So to answer the question:

>Really? What program's creator code should I insert?

The creator string of an application that you have that processes files
of type TEXT. Obviously, you wouldn't put in the creator string for
MacPaint, which doesn't process TEXT files. If you did, MacPaint would be
launched, it ignores the file because it is not the right type (PNTG),
and it opens a blank  "untitled" window. The mileage may vary for
other programs.

>Wouldn't the
>program then assume the file is in its internal format and generate
>interesting results?

Since an application might use many different file types, it can't
assume what the type of any file is. It doesn't have to: it is given
the file types by the Finder. That is not to say that someone
couldn't write an application that only worked with one file type,
assumed that all files were of that type, and ignored the Finder
info.

Herb Poppe      NCAR                         INTERNET: hpoppe@ncar.ucar.edu
(303) 497-1296  P.O. Box 3000                   CSNET: hpoppe@ncar.CSNET
		Boulder, CO  80307               UUCP: hpoppe@ncar.UUCP
Technical Details
Message-ID: <5915@ncar.ucar.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rutgers!ucsd!ames!ncar!bierstadt!hpoppe
References: <2706@aecom.yu.edu> <5900@ncar.ucar.edu> <1998@eric.mpr.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rutgers!ucsd!ames!ncar!bierstadt!hpoppe
From: hpoppe@bierstadt.ucar.edu (Herb Poppe)
Newsgroups: comp.sys.mac
Subject: Re: Text file madness on the Mac.
Message-ID: <5915@ncar.ucar.edu>
Date: 6 Jan 90 00:39:02 GMT
References: <2706@aecom.yu.edu> <5900@ncar.ucar.edu> <1998@eric.mpr.ca>
Sender: news@ncar.ucar.edu
Reply-To: hpoppe@bierstadt.UCAR.EDU (Herb Poppe)
Distribution: na
Organization: Scientific Computing Division/NCAR, Boulder CO
Lines: 77