CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
TKX Menu Updating

 



Jukari
Novice

Oct 31, 2011, 5:51 AM

Post #1 of 2 (1103 views)
TKX Menu Updating Can't Post

I have a menu at the top of my program. Which has a list of items that are created dynamically. Later in my program it allows me to delete items out of that list. The item deletes out of my list but the menu bar still holds the item that was deleted because it is still an active subroutine. Is there anyway to update my menu bar, my attempts to do so have resulted in errors like "must be idle tasks"

Example of program:

my $mw = Tkx::widget->new(".");
$mw->g_wm_title("Wikiget");
$mw->g_wm_minsize(500, 200);
$mw->configure(-menu => mk_menu($mw));

###Global Variables######
my @open_windows;
my %list;
Tkx::MainLoop();
exit;
####################################################

sub mk_menu
{
#creates dynamic menu from a file.
}
sub delete
{
#deletes one of the entry's in the file used to create the dynamic menu.

Tkx::update(); #Doesn't seem to work. The list still holds relic data.
}

Thank you.


Jukari
Novice

Oct 31, 2011, 6:14 AM

Post #2 of 2 (1099 views)
Re: [Jukari] TKX Menu Updating [In reply to] Can't Post

Nevermind, found out that by calling the same subroutine again works.

$mw->configure(-menu => mk_menu($mw));

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives