[comp.sys.apple] Hlep with QuitGS Needed

TMPLee@DOCKMASTER.NCSC.MIL (03/01/90)

One more step in a continuing saga ...

I'm trying to write an application that does some processing on the GS,
creates a couple of files, starts up my PC Transporter, and then resumes
when the PCT is done.  Except for finding some magic code that will run
on the PCT and cause it to automatically exit (unless AE comes through
with an answer I guess I'll have to settle for entering the manual key
sequence), I thought it was going to be pretty straightforward -- just
do a QuitGS that called for AEPC.SYSTEM to be run next.

When I tried it with a very short program to make sure I had the calling
sequence right, it seemed to work.  When I put that code in my real
application it didn't -- on return from the PCT it displayed the One
Moment Please ...  message and then gave me a system error $0003.

I'm writing in TML Pascal II, on system disk 5.0.2 (maybe its only 5.0).

I've tried it using both $8000 (reload application) or $0 for the quit
flags (also, with parameter count 1 or 2.)  I also tried it including a
shutDownTools call just before the QuitGS call.  (different errors in
all these different cases.)

It obviously can be done, since presumably that is how the Finder starts
up the AEPC.SYSTEM program, and the return is gracefully back to the
finder (not to a reboot).

So, what do I need to do before the QuitGS call so that it works?

(I don't need to make the application restartable, which I suspect I
can't; reloadable is enough:  I can tell form what files I've created
whether I'm starting fresh or restarting after having invoked the PCT.)

(In case its relevant, note that AEPC.SYSTEM is P8 application, so P8
has to be loaded; but, as I said, it works fine form teh Finder.)

TMPLee@dockmaster.ncsc.mil

dlyons@Apple.COM (David A. Lyons) (03/02/90)

In article <900228173258.348448@DOCKMASTER.NCSC.MIL> TMPLee@DOCKMASTER.NCSC.MIL writes:
>I'm trying to write an application that does some processing on the GS,
>creates a couple of files, starts up my PC Transporter, and then resumes
>when the PCT is done.
>[...]
>When I tried it with a very short program to make sure I had the calling
>sequence right, it seemed to work.  When I put that code in my real
>application it didn't -- on return from the PCT it displayed the One
>Moment Please ...  message and then gave me a system error $0003.

The Finder gives you the message "Unable to load necessary tools.  Error
number $0003" if it has any trouble starting things up--this includes
having a toolset *already* started up when it shouldn't be.  It sounds
like the system was trying to run the Finder, not your application.
That would mean you didn't successfully make a Quit call with the
return-to-me bit set in the flags ($8000).

>I've tried it using both $8000 (reload application) or $0 for the quit
>flags (also, with parameter count 1 or 2.)  I also tried it including a
>shutDownTools call just before the QuitGS call.  (different errors in
>all these different cases.)

"Different" errors?  I could be more helpful with the numbers.  Did your
ShutDownTools correspond to a StartUpTools call you had made in your
application?
-- 
David A. Lyons, Apple Computer, Inc.      |   DAL Systems
Apple II Developer Technical Support      |   P.O. Box 875
America Online: Dave Lyons                |   Cupertino, CA 95015-0875
GEnie: D.LYONS2 or DAVE.LYONS         CompuServe: 72177,3233
Internet/BITNET:  dlyons@apple.com    UUCP:  ...!ames!apple!dlyons
   
My opinions are my own, not Apple's.