I've been working on a recipe organizer for my wife using Perl and GTK. It's been really fun, and I've learned a lot. However, I can't figure out how to update a CList in a window. Here's my code to initially create the clist and put it in the window (this works fine):
#get the recipe list in the main windows my $recipe_clist = show_recipe_list(); ## pack everything in ## $window_main->set_contents( $recipe_clist); ## show everything in the main windows ## show_all $window_main;
Here is my subroutine to refresh it (doesn't work):
sub refresh_main_window { $recipe_clist->hide(); $recipe_clist = show_recipe_list() || die "Problem on exchange +: $!"; $recipe_clist->show_now() || die "Problem on show: $!"; }
My instinct was to hide the CList (which happens), redefine the CList, then redisplay it in the window (never happens -- thus my problem).

The error message returned from the "$recipe_clist->show_now()" line says Resource temporarily unavailable .

Any solutions or ideas for further investigation?


In reply to refreshing a GTK widget by melguin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.