in reply to Re: how to implement ipc on linux?
in thread how to implement ipc on linux?

thanks for the excellent example (and I am using Tk now!) but I don't really need all those unecessary widgets on the screen (like stdout).

I just need something like (pseudocode)

system(command) until (done or user_aborted_with_keypress) quit if done; goto next step if user hit 'N' goto previous step if user hit 'P'
I could use Tk if it would be more sparse on the interface tho...

thanks!

Replies are listed 'Best First'.
Re^3: how to implement ipc on linux?
by zentara (Cardinal) on Feb 17, 2005 at 13:30 UTC
    I don't have an example handy, but Tk::ExecuteCommand has "advertised subwidgets", which means you can access the various components separately, and change their appearance. So you could make the stdout textbox, nearly invisible. For that matter, you could run it with the window "withdrawn", to make it totally invisible. You also could setup custom key bindings, to call the same "Quit" subroutine, as the Execute/Stop button has. Read perldoc Tk::ExecuteCommand and look for the "ADVERTISED SUBWIDGETS" section. You possibly could do something like:
    my $rotext = $ec->Subwidget(ROText); $rotext->configure(-height => 0);
    and you could add key bindings, like
    $text->bind('<Control-r>',sub{$ec->kill_command });
    Of course, this only works from X, if you want it to work from the command line, try POE; maybe the POE Cookbook has some examples.

    I'm not really a human, but I play one on earth. flash japh