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?