help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: R: Best way to create interactive GUI apps with octave?


From: Carlo de Falco
Subject: Re: R: Best way to create interactive GUI apps with octave?
Date: Thu, 22 Apr 2010 15:48:46 +0200


On 22 Apr 2010, at 14:00, Riccardo Corradini wrote:

Sure,
but the example is not mine
'cause is taken from
http://forum.ubuntu-it.org/index.php?topic=111537.msg756738

PUBLIC processo AS Process

PUBLIC SUB Form_Open()

  StartOctave()

END

PUBLIC SUB Process_Read()

  DIM sLine AS String

  READ #processo, sLine, - Lof(processo)

  Terminale.Text = Terminale.Text & sLine

END

PUBLIC SUB StartOctave()

  Processo = SHELL "octave" FOR INPUT OUTPUT

END


PUBLIC SUB Button1_Click()

  PRINT #Processo, Comando.Text

END


The function StartOctave runs the process and links pipes (Processo = SHELL "octave" FOR INPUT OUTPUT)
In this way I can read and write over a process like if it were a file
With the function Button1_Click() I print the commands that the users writes over the process (it is a just a sort of terminal) While Process_Read is the function that controls if there is something to read over the stream process and adds it to text-box "terminale" in order to visualize it.

Hope my rough translation will be useful to the community.
Bests
Riccardo Corradini


Riccardo,
Thanks for the example.
Communication via pipes might work for simple cases but
is much less powerful than embedding Octave.
Therefore, I beleive using Gambas gives no advantage at all compared
to building the GUI in python as suggested by Jaroslav,
while it has lots of disadvantages in terms of speed, memory and flexibility.
c.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]