[Gambas-user] How do I manage process_Read?

Benoit Minisini gambas at ...1...
Wed Sep 15 14:25:52 CEST 2004


On Sunday 12 September 2004 21:27, Rob wrote:
> On Sunday 12 September 2004 14:01, francesco.difusco at ...69...
>
> wrote:
> > I need to execute different Linux command in the same form,
> > using the EXEC istruction, but I don't know how to manage them
> > in the same process_read event handler. For every command I
>
> Try something like this.....
>
> PUBLIC Process1 AS Process
> PUBLIC Process2 AS Process
> ...
> EXEC ["first thing"] FOR READ WRITE AS Process1
> EXEC ["second thing"] FOR READ WRITE AS Process2
> ...
> PUBLIC SUB Process_Read()
>
> 	if last.id = Process1.id then
> 		' do something
> 	else if last.id = Process2.id then
> 		' do somethine else
> 	endif
>
> END
>
> I agree that it should be possible to have separate _Read events
> for different Process objects, but I assume there's a reason
> Benoit did it this way.

Yes, but not a real good reason. Just that I didn't find a clean syntax for 
naming the process object in EXEC. AS is already used for filling the process 
variable.

I am opened for any suggestion!

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list