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

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.