[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: perlTK
From: |
Joao Cardoso |
Subject: |
Re: perlTK |
Date: |
Mon, 31 Jan 2000 01:42:22 +0000 |
"John W. Eaton" wrote:
>
> On 21-Jan-2000, Daniel Heiserer <address@hidden> wrote:
>
> | My question for a fast-hack-gui:
> |
> | can I launch a perl script via "system" or
> | something else, redirect the
> | input of octave to a pipe which is fed
> | by perlTK of the perlscript?
> | Can I exit the perlscript, or
> | "pause" it somehow, in the way that octave
> | goes back to the STDIN, and
> | when my terminal hacking is
> | finished I redirect to my
> | perlTK gui?
>
> If what you are asking is how to make Octave continue to accept input
> at the command-line prompt and also process GUI events, I think the
> answer is to register an event hook function with readline.
Couldn't Octave have a function to do it? Something like
on_idle("user function","user data")
Then Octave could have a general wrap function, registered with
readline, that would call the user function (be it a script file or dll
function). Something like (in C, of course):
function on_idle_wrapper
if ( ! exist(user_idle_function))
return
endif
feval("user_function","user data")
endfunction
on_idle_wrapper would always be registered by Octave with readline.
Also, on_idle_wrapper could be called by octave itself whenever, say,
the parser finish parsing a line (I need help on this). This would
provide some iterativity while octave runs a script.
This would provide an uniform interface for whatever the user wants.
Any suggestions or comments? I could try to implement it.
I have already implemented a working (but not recommendable)
on_signal(signal_number, user_function, user_data)
that intercepts unix signals and executes an user function on its
occurence.
Joao
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------
- perlTK, Daniel Heiserer, 2000/01/21
- perlTK, John W. Eaton, 2000/01/27
- Re: perlTK,
Joao Cardoso <=