Prima::Edit display speed

From: lanas <>
Date: Sun, 23 Oct 2005 14:15:23 -0400

Hi !

  Following the previous topic on running parallel commands using a

   $file = Prima::File-> new(
         file => feed_batch,
          mask => fe::Read,
           onRead => \&runBatch

  I show in an Prima::Edit widget the output of the external commands
like this ($buffer is what's read from the pipe):

    $form->MsgBox->insert_text(" " . $buffer . "\n\n");

  With some parallel process like this:

for ((i = 0; i < 3; i++))
  echo "This is batch *2* repeating itself time $i"
  echo "This more and more and more text"
  sleep 1

  Works fine as far as there's only one line per second. But the above
example outputs two lines in one shot and the Prima::Edit does not get
the first new lines and/or does not move the cursor down. The result
is a messed-up edit display where lines were thrown far at the bottom
of the display (have to scroll down to see them). Could this be caused
by Prima::File and the pipe ?

  Now, is there a way to better do this than what I'm doing at the
moment ? Is it possible for the Prima::Edit and Prima::File combination
to cleanly get all lines that can be sent by an external process ?

  Dmitri's example of such parallel processing works fine but it does
not use a Prima::Edit widget.


Received on Sun 23 Oct 2005 - 20:15:40 CEST

This archive was generated by hypermail 2.2.0 : Sat 19 Mar 2011 - 18:35:06 CET