Page 1 of 1

Re: On Starting Applications

Posted: November 29th, 1984, 2:45 am
by Info-Mac
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 UW 5/3/83; site uw-beaver
Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!houxm!vax135!cornell!uw-beaver!info-mac
From: info-mac@uw-beaver (info-mac)
Newsgroups: fa.info-mac
Subject: Re: On Starting Applications
Message-ID:
Date: Fri, 2-Nov-84 23:10:20 EST
Article-I.D.: uw-beave.2098
Posted: Fri Nov 2 23:10:20 1984
Date-Received: Mon, 5-Nov-84 08:04:21 EST
Sender: yenbut@uw-beave
Organization: U of Washington Computer Science
Lines: 53

From: Mark H. Nodine
The Drag-Icon-Outline method which you have described could almost certainly
be implemented, but it would have to be the Finder that is suitably crafted
rather than (or perhaps in addition to - more on that later) the application.
There is, however, a little-known fact about the way the finder works which
allows the same effect to be achieved in certain circumstances. Say, for
example, you have a text file which was not created with MacWrite, but which
you wish to edit with MacWrite. What you can do is the following:
(1) Select the text file.
(2) Use shift-click to select MacWrite in addition to the text file.
(3) Choose Open out of the File menu.
This will fire up MacWrite to open the text file. There is a short-cut to
steps 2-3 for the adventuresome: it is possible to do a shift-double-click
by holding the shift key down for the first click in the double-click
sequence and releasing it before the second click. This means you do
(1) Select the text file.
(2) Shift-double-click MacWrite.
That will do it. For applications which can multiple files to be open at
once, this method can be extended in the obvious way by preselecting all of
the documents before shift-double-clicking the application.

There are three restrictions to this method. Perhaps the most painful and
least intuitive is that all the documents and the application have to
be in the same window for this to work. This is because a shift-click
unselects anything which is not in the same window. The other two
restrictions are on the part of the application. The second restriction is
that the application must be written to take advantage of what are called the
Application Parameters. These are pieces of information which the Finder
makes available to the application and include the name of the application,
the reference number of the applications resource file, and some information
about each of the files which were selected when the application was started.
The third restriction is that which the application places upon the kinds of
files it is prepared to deal with. In the case of MacWrite, for example, it
is glad to edit any file with type TEXT (the type of the file is part of the
information you get in the Application Parameters for each file), but would
probably not allow you to edit a file of type APPL which contains resources.
For more information on the Application Parameters, see the Segment Loader
manual in Inside MacIntosh. For more information about how applications
are to deal with said parameters, see "The Structure of a MacIntosh
Application" (also in Inside Mac).

One additional problem is that multiple file selections do not get presented
to the application in the order in which you selected them, but rather in
an order which seems to be determined by their graphical positions within
the desktop.

So the long and short of it is that many programs can be started up to be
initially opened to a file which they did not create (i.e., one which is not
``wedded'' to the application), and any programs you write can be made to
do likewise.

Enjoy,
Mark