[comp.sys.mac.hypercard] Opening file with Multifinder

jkc@apple.com (John Kevin Calhoun) (05/01/91)

In article <41861@cup.portal.com> David_Greg_Herlihy@cup.portal.com writes:

>When you use the command "open file x with [application]" while running
>the single finder, Hypercard obediently finds the file and opens it
>with the specified application (if such file exists).  What I find
>annoying, however, is that this command does not seem to work if you
>are running multifinder and the specified application is already opened.
>Rather than opening the file, Hypercard merely switches you to whatever
>file is currently opened in the application rather than the file you requested
>
>Does anyone know how to make this command behave with multifinder?  Is
>this something we can expect to go away with system 7.0 or a HyperCard upgrade
>Thanks for your help.  David

In order for this to work, a number of things have to change:

1) there has to be some service at the system level that applications can
   use to communicate with one another
2) HyperCard has to know how to use this service to tell another application
   to open a document
3) the target application has to know how to listen and how to respond

Fortunately, there's some good news:

1) under System 7.0, applications can communicate with one another via
   Apple events
2) in HyperCard 2.1, the "open" command will be extended -- it will know
   how to send an "open document" event to another running application
   that's "Apple event-aware"
3) other applications are being revised and will also become "Apple event-
   aware"

(No promises as to the availability of any of the pieces of software I've
mentioned!)


Kevin Calhoun
formerly of the former HyperCard Team
Apple Computer, Inc.

Disclaimer: I'm just a tired raving fool.

jcav@quads.uchicago.edu (john cavallino) (05/02/91)

In article <52245@apple.Apple.COM> jkc@apple.com (John Kevin Calhoun) writes:
>In article <41861@cup.portal.com> David_Greg_Herlihy@cup.portal.com writes:
>>When you use the command "open file x with [application]" while running
>>the single finder, Hypercard obediently finds the file and opens it
>>with the specified application (if such file exists).  What I find
>>annoying, however, is that this command does not seem to work if you
>>are running multifinder and the specified application is already opened.
>>Rather than opening the file, Hypercard merely switches you to whatever
>>file is currently opened in the application rather than the file you requested
>>
>>Does anyone know how to make this command behave with multifinder?  Is
>>this something we can expect to go away with system 7.0 or a HyperCard upgrade
>>Thanks for your help.  David
>
>In order for this to work, a number of things have to change:
>
>1) there has to be some service at the system level that applications can
>   use to communicate with one another
>2) HyperCard has to know how to use this service to tell another application
>   to open a document
>3) the target application has to know how to listen and how to respond

Why didn't/doesn't HyperCard do it the old Multifinder way (actually, only
System 6.0 or newer) which was the nasty kludge of faking a selection
of the application's "Open..." command?   Stomach-turning or not, at least
this method did the job.


-- 
John Cavallino                      |     EMail: jcav@midway.uchicago.edu
University of Chicago Hospitals     |    USMail: 5841 S. Maryland Ave, Box 145
Office of Facilities Management     |            Chicago, IL  60637
B0 f++ w c+ g+ k s(+) e+ h- pv (qv) | Telephone: 312-702-6900

jkc@Apple.COM (John Kevin Calhoun) (05/02/91)

In article <1991May1.181756.14689@midway.uchicago.edu> jcav@quads.uchicago.edu 
(john  cavallino) writes:

>Why didn't/doesn't HyperCard do it the old Multifinder way (actually, only
>System 6.0 or newer) which was the nasty kludge of faking a selection
>of the application's "Open..." command?   Stomach-turning or not, at least
>this method did the job.

In 6.x, only the Finder knows how to get MultiFinder to perform this fake-out.
There's no supported way for an application to do it.  So, if you're HyperCard
or the MPW Shell or some other application that wants to do this, either you
risk incompatibilities by horning in where you're not welcome or you resign
yourself to waiting for an approved solution to come along.  As far as I know,
just about everybody waited.

Kevin Calhoun
Apple Computer, Inc.

jcav@quads.uchicago.edu (john cavallino) (05/02/91)

In article <52283@apple.Apple.COM> jkc@Apple.COM (John Kevin Calhoun) writes:
>In article <1991May1.181756.14689@midway.uchicago.edu> jcav@quads.uchicago.edu 
>(john  cavallino) writes:
>>Why didn't/doesn't HyperCard do it the old Multifinder way (actually, only
>>System 6.0 or newer) which was the nasty kludge of faking a selection
>>of the application's "Open..." command?   Stomach-turning or not, at least
>>this method did the job.
>
>In 6.x, only the Finder knows how to get MultiFinder to perform this fake-out.
>There's no supported way for an application to do it.  So, if you're HyperCard
>or the MPW Shell or some other application that wants to do this, either you
>risk incompatibilities by horning in where you're not welcome or you resign
>yourself to waiting for an approved solution to come along.  As far as I know,
>just about everybody waited.

But if all the products (Finder/Multifinder/Hypercard/MPW) are produced by
the same company, wouldn't it make sense for the various software engineers
to let each other in on their secrets?  Since Hypercard's ability to launch
other applications is a very "system-software-ish" sort of thing, I still
think it would have been nice to have implemented the Multifinder kludge.

-- 
John Cavallino                      |     EMail: jcav@midway.uchicago.edu
University of Chicago Hospitals     |    USMail: 5841 S. Maryland Ave, Box 145
Office of Facilities Management     |            Chicago, IL  60637
B0 f++ w c+ g+ k s(+) e+ h- pv (qv) | Telephone: 312-702-6900

jkc@Apple.COM (John Kevin Calhoun) (05/02/91)

In article <1991May2.000016.27408@midway.uchicago.edu> jcav@quads.uchicago.edu
(john  cavallino) writes:

>But if all the products (Finder/Multifinder/Hypercard/MPW) are produced by
>the same company, wouldn't it make sense for the various software engineers
>to let each other in on their secrets?  Since Hypercard's ability to launch
>other applications is a very "system-software-ish" sort of thing, I still
>think it would have been nice to have implemented the Multifinder kludge.

There are two conflicting goals here:

1) knowing the secrets and getting cool stuff to work

2) maintaining an application that thousands of people use and that should
   not break under future releases of system software

Sometimes it's better not to exploit your knowledge of how things work at
the system level.  This is one of those cases.  All applications rely on
a published and supported interface to services that the system provides,
and to some degree they also rely on unpublished and unsupported things
that may change in a subsequent release of the system software.  If you
rely too heavily on the unsupported stuff, you might look like a hero for
a while, but you'll get caught with your pants down when System N.0 comes
out, and everybody will say you're a bozo.  (Unless you got x million
dollars for what you did. :-)

The MultiFinder fake-out, which is most often referred to here as
"MultiFinder puppet strings", has a big sign on it that says, "Angels
fear to tread here."

Kevin Calhoun
Apple Computer, Inc.