[fa.info-mac] On Starting Applications

info-mac@uw-beaver.UUCP (11/02/84)

From: "Kevin W. Laurent" <KLaurent@DENVER.ARPA>
There are two common ways to start a Mac application--opening the
application itself (via File menu pick or double-click) or opening a
document ``wedded'' to the application.  On the Xerox Star there is
another way of starting an application (of course, they don't call it
such) and I'm wondering whether this method is implemented on the Mac.
Let's call this third application start up method the Drag-Icon-Outline
method.  Here's how Drag-Icon-Outline works on the Star (to start
printing a document on the laser printer):

 1. The user selects a document icon to be printed and pushes either MOVE
    or COPY from the keyboard (this is similar to the click-and-hold
    process on the Mac).
 2. The user moves the small version of the icon (icon outline on the
    Mac) over top of the Printer icon.
 3. The user clicks the mouse, dropping the small document icon on top
    of the printer icon (same as releasing the mouse button on the Mac).
 4. The application begins.

A similar effect occurs on the Mac.  For instance, selecting a file icon
and dragging its outline on top of the disk icon until its image inverts
causes the dragged file to be copied to the now selected disk.  Two
other cases exhibit similar characteristics--putting an icon-object in a
folder, and using the trashcan to discard an icon-object.  So, again,
the question I have is...Can an *application* (suitably crafted) be
started using the Drag-Icon-Outline method or are the uses of this
method restricted to Finder functions?

The idea behind using this method is that it alleviates the need for
going through the open file sequence once inside the application (i.e.
selecting Open from the File menu, scrolling through a list of files in
an Open Dialog Box, and double-clicking the name of the file).

Any ideas?

 KLaurent@DENVER

info-mac@uw-beaver (info-mac) (11/03/84)

From: Mark H. Nodine <mnodine@BBNH.ARPA>
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