newbie trap



Hi. I find myself writing a program that processes the gtk gui events
itself. E.g. code vaguely similar to the pseudo-code:

while( large_compute_bound_job_not_finished )
{
  process_next_block_of_data();
  gtk_progress_bar_set_fraction( progressBar, fraction );
  
  while ( gtk_events_pending ())
          gtk_main_iteration ();
}

Is this something that it is frequently sensible to do, or have I fallen
into a big newbie trap?

Cheers,

Ross-c




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