Path: utzoo!utgpu!watmath!clyde!att!rutgers!mailrus!ames!oliveb!tymix!antares!jms
From: jms@antares.UUCP (joe smith)
Newsgroups: comp.sys.amiga
Subject: How to get ShowANIM to start AND STOP from an icon
Summary: Use NEWCLI from ...
Keywords: ^C needs a CLI
Message-ID: <286@antares.UUCP>
Date: 3 Dec 88 11:48:33 GMT
References: <9029@gryphon.COM> <1119@esunix.UUCP>
Reply-To: jms@antares.UUCP (joe smith)
Organization: Tymnet QSATS, San Jose CA
Lines: 65

In article <1119@esunix.UUCP> blgardne@esunix.UUCP (Blaine Gardner) writes:
>I hope I didn't start any flames with my first posting, but I was trying
>to figure out why Walker was crashing. I still have no idea why (maybe
>it was already discussed), but I found out how to stop it. If I have
>IconX execute a script that makes the 3 assigns, and runs the demo,
>nasty things happen, including writes to the hard drive that corrupted
>one or more of the data files.
>
>On the other hand, if I have the following IconX script, everything is
>fine.
>
>newcli from walker.exec
>
>Walker.exec is the same script that IconX was executing directly before.

Thank you thank you thank you.

You have helped me solve the problem I was having with ShowANIM.  I rushed
right home and put the suggestion to work.  It appears that certain things,
such as recognizing Control-C or doing an ASSIGN requires a process with a CLI
structure, something that XICON lacks.  In particular, if you run any of the
BADGE killer demos from last year by clicking on the icon, XICON starts
ShowANIM, but you can't abort it by typing Control-C.  Left-Amiga-N does not
work; the only way out had been to reboot the machine.  But no more!

Here's how I did it.  The project icon (RunDemo.info) has :c/XICON as its
default tool.  The RunDemo file has 3 lines:
	cd DemoDisk:DemoDirectory
	type ReadMeLast
	NewCLI CON:0/0/640/200/ShowANIM from Credits
The Credits file is:
	;This demo was created by Joe Smith
	; ... distributable ...
	; name, address, etc
	:c/ShowANIM -l +4 DemoFile
	:c/less ReadMe
	EndCLI

When the RunDemo icon is clicked, the one-page file ReadMeLast is put up on
the screen and then almost immediately covered up by the NewCLI window.
ShowANIM runs until the user types Control-C.  Then the ReadMe file is
presented, one screen at a time.  At the end of this file, the NewCLI
window goes away, and leaves the XICON window which is still displaying
the ReadMeLast file.  The user clicks XICON's close gadget to terminate
the demo.

>Two questions:
>1) Was this problem cause by IconX, The Director, or the phase of the
>   moon?
>
>2) Sometimes when the Walker demo is exited (by clicking a mouse button)
>   the sound channels are not given back to the system. Any fix for
>   this?
>
>	Thanks, Blaine.

I expect we would not have as many problems if XICON ran as a process with
CLI instead of as a process without CLI.  (I haven't tried ICONX from 1.3
to see if it has the same problems.)

-- 
+----------------------------------------------------------------------------+
| TYMNET:JMS@F29  CA:"POPJ P,"  UUCP:{ames|pyramid}oliveb!tymix!antares!jms  |
| INTERNET: (Office-1.ARPA is no more)      PHONE:Joe Smith @ (408)922-6220  |
+----------------------------------------------------------------------------+