[Gambas-user] How do I manage process_Read?
francesco.difusco@libero.it
francesco.difusco at ...69...
Sun Sep 12 23:47:36 CEST 2004
.
>
> You can do this with Object.Attach().
> Suppose there is a form with a button and two textareas:
>
> PUBLIC SUB Button1_Click()
>
> DIM p1 AS Process
> DIM p2 AS Process
>
> EXEC ["ls", "/" ] FOR READ AS p1
> EXEC ["ls", "/usr/lib" ] FOR READ AS p2
>
> Object.Attach(p1, ME, "proc1")
> Object.Attach(p2, ME, "proc2")
>
> END
>
> PUBLIC SUB proc1_Read()
>
> DIM aline AS String
> LINE INPUT #LAST, aline
> aline = aline & "\n"
> TextArea1.Text = TextArea1.Text & aline
>
> END
>
> PUBLIC SUB proc2_Read()
>
> DIM aline AS String
> LINE INPUT #LAST, aline
> aline = aline & "\n"
> TextArea2.Text = TextArea2.Text & aline
>
> END
>
It works perfectly, thanks. I have solved my problems.
Francesco
More information about the User
mailing list