Hi
Thank you for your reply !
But still one more thing is not working, though I am following the cpan doc for HList. I have tried using both itemExists($entrypath,$col) and info(exists, $entrypath), but of no use.
The scenario is like :
The gui always has two columns , no issue on that.
But first time the gui has one row, so entrypath 0 is added and I used itemCreate() to populate values.
Next time due to updation of the input file the gui should have some 3 rows with entirely new data. This time for entrypath 0 , the if(itemExists) returns true and I am using itemConfigure inside the if block. All fine so far.
But next iteration for entrypath 1, itemExists should fail and I should be able to go to the else block to add() and itemCreate(), but I am not able to.
I am getting following error :
XS_Tk__Callback_Call error:Entry "1" not found at /user/perl_5.8.8/lib/Tk.pm line 250.
Tk::Error: Entry "1" not found at /opt/perl_5.8.8/lib/Tk.pm line 250.
Tk::Error:: Too many arguments.
Tk callback for .frame1.frame.hlist
Tk::After::repeat at /opt/perl_5.8.8/lib/Tk/After.pm line 79
[repeat,[{},after#12,5000,repeat,\&main::clear_data]]
[repeat,[{},after#12,5000,repeat,&main::clear_data]]: No match.
Here is the code snipppet which is not working
if($hl->itemExists($path,0)){ #if($hl->info(exists, $path)){ # tried both info and itemExist alterna +tely, but :( print "itemexists ...\n"; $hl->itemConfigure($path,0,-text=> $hash->{$user}->{$tool}->{tool} +); $hl->itemConfigure($path,1,-text=> $hash->{$user}->{$tool}->{issue +d}) ; $hl->itemConfigure($path,2,-text=> $hash->{$user}->{$tool}->{inuse +}); $hl->itemConfigure($path,3,-text=> $hash->{$user}->{$tool}->{in +use}, -style => $color); } else { print "Inside else ....\n"; $hl->add($path); $hl->itemCreate($path,0,-text=> $hash->{$user}->{$tool}->{tool}); $hl->itemCreate($path,1,-text=> $hash->{$user}->{$tool}->{issued}) ; $hl->itemCreate($path,2,-text=> $hash->{$user}->{$tool}->{inuse}); $hl->itemCreate($path,3,-text=> $hash->{$user}->{$tool}->{inuse}, -style => $color); }
In reply to Re^4: Perl Tk , MainLoop, destroy function problem
by ghosh123
in thread Perl Tk , MainLoop, destroy function problem
by ghosh123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |