gnope php gtk gui gnope.org  

Flushing a GtkTextBuffer

 
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners
View previous topic :: View next topic  
Author Message
neters



Joined: 04 Jan 2006
Posts: 5

PostPosted: Wed Jan 25, 2006 4:18 pm    Post subject: Flushing a GtkTextBuffer Reply with quote

I have a function that takes some time to complete and would like to have a status window to indicate progress. The function is in a foreach loop and during each iteration and I send a message to the buffer.

I'm using a GtkTextBuffer->insert_at_cursor() and everything works fine except that no output is visible until after the function is completed.

I've tried using flush() and ob_flush() to no avail. What am I doing wrong here?

Thanks
Back to top
karlbowden



Joined: 18 Dec 2005
Posts: 21
Location: Taree, NSW, Australia

PostPosted: Wed Jan 25, 2006 4:28 pm    Post subject: Reply with quote

If it's a cpu intensive operation you might try adding:

Code:
    while (gtk::events_pending())
        gtk::main_iteration();


into the foreach loop
Back to top
neters



Joined: 04 Jan 2006
Posts: 5

PostPosted: Wed Jan 25, 2006 4:44 pm    Post subject: Reply with quote

That works perfectly.. thanks Karl.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Templates enhanced by DigiWiki. Hosting by Tradebit.