Path: news.daimi.aau.dk!not-for-mail From: Morten Grouleff Newsgroups: comp.lang.beta Subject: Re: Arguments to external processes Date: 15 Sep 1998 10:48:05 +0200 Organization: Mjolner Informatics Lines: 40 Message-ID: References: <35FD4DB2.42A13170@daimi.aau.dk> NNTP-Posting-Host: heimdal.mjolner.dk Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: xinwen.daimi.aau.dk 905849285 9948 255.255.255.255 (15 Sep 1998 08:48:05 GMT) X-Complaints-To: news@daimi.aau.dk NNTP-Posting-Date: 15 Sep 1998 08:48:05 GMT X-Newsreader: Gnus v5.5/Emacs 19.34 Xref: news.daimi.aau.dk comp.lang.beta:11698 Bo Normann Pedersen writes: > Say I wan't start a program 'fun' from my betaprogram, so I use the > BETA-processmanager and I write something like this : > > OnMouseDown:: > (# do (if DoubleClick then > 'fun' -> > mpgProcess.init; > mpgProcess.start; > if); > #); > > Where the program 'fun' is placed in the same dir where I run my > beta-program. > Now I want to start the external program with an argument, fx 'fun > Onthis'. How is that done. I can't seem to get it right from the > procesmanager.bet file. I don't know what to write ! The code above is not correct. The name has to be given to init. Arguments are passed to arguments.append: OnMouseDown:: (# fun: @Process; do (if DoubleClick then 'fun' -> fun.init; 'Onthis' -> fun.arguments.append; fun.start; if) #) Look at the demos to find out how to detect when fun terminates. It is in fact mandatory to call awaitStopped after the process has terminated to stop the process from becomming zombie. If your program is short-lived, this may not be a problem for you. -- ** Morten Grouleff: ** ** Earthworm Jim PC: ** ** Mjølner Informatics: **