[Gambas-user] Is it possible to receive events on an array of 'Process' objects?

Phil Underhill pjbonovox at ...626...
Tue Sep 20 15:59:45 CEST 2016


Hi all,

I'm working on a project that would benefit from being able to receive
events from an array of Process controls. I've been successful in
creating the array, but the Process.Read and Process.Error events
don't seem to be triggered once the controls are in the array.

For example...

Public myConns As New Process[]

Public Sub something()
  Dim connShell as Process
  Shell "/usr/bin/blah" For Read As "connShell"
  myConns.Add(connShell)
End

Public Sub Process_Error(connError As String)
  Debug "An error occured"
End

Public Sub Process_Read()
  Debug "There's something to read"
End


In the above example the events are never triggered. Is there an
alternative way I should be doing this, or is it not possible?

Many thanks.




More information about the User mailing list