[Gambas-user] Dynamic processes and killing them
Brian Snipes
bsnipes at ...21...
Sat Jul 19 16:43:12 CEST 2003
On Fri, 2003-07-18 at 22:43, Rob wrote:
> On Friday 18 July 2003 23:08, Brian Snipes wrote:
> > clicked on. There is also a delete button that I want to remove the
> > list item and kill the process that goes along with that item. I can't
> > seem to figure out how to determine how to remove this process. Here is
> ...
> > EXEC ["ping", txtInsert.text] FOR READ AS myProcess
> ...
> > TRY Process.kill(myPid)
>
> Process.Kill isn't static, so you would need to be using myProcess.kill (with
> no argument.)
>
> Also, every time you insert a new process you're overwriting your public
> myProcess variable and thus losing the reference to the previous ping, so
> maybe you want to be doing an array or collection of process objects rather
> than just the one.
>
> Rob
>
I take it the declaration of the array would be :
PRIVATE myProcess AS String[]
But how do I add that to the EXEC line for keeping track of it. I've tried:
EXEC ["ping", txtInsert.text] FOR READ WRITE AS myProcess().add
but I get a 'Null Object' error on that line when it tries to execute.
Thanks Rob and Benoit,
Brian
More information about the User
mailing list