wdef2 has asked for the wisdom of the Perl Monks concerning the following question:
Okay I give up. I have googled and googled. I swear there is not a single explicit snippet on the entire web about how to do this in gtk2-perl, which unfortunately says something about the documentation, given that it must be a very common problem. Usually I can find a snippet to show me how to do just about anything in Perl if I look hard enough. Not this time.
I have a widget displaying a default image. Once the action starts in a callback, I want to change that displayed image.
I have tried printing to an indirect filehandle as for communicating between subs, and that doesn't work. I have tried calling $img_scaled->show() or Gtk2 ->main_iteration again in the callback's sub until I'm blue in the face. It just don't work. It seems the main loop is blocked on that callback and simply cannot see a change to that global pixbuf made in a callback. And yet I can pass refreshed text to a textbox in that same UI using the indirect filehandle method.
Help please, O Monks! (*teeth marks on my laptop*).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: gtk2-perl: how to update image widget from callback?
by Anonymous Monk on Oct 01, 2012 at 12:07 UTC | |
by wdef2 (Acolyte) on Oct 01, 2012 at 12:22 UTC | |
by wdef2 (Acolyte) on Oct 01, 2012 at 12:42 UTC | |
by Anonymous Monk on Oct 01, 2012 at 12:58 UTC | |
by wdef2 (Acolyte) on Oct 01, 2012 at 13:10 UTC | |
|