Hello, I'm writing a script that needs a progress bar that goes back to 0 (at the beginning of each file being parsed in, obviously ;-), but cannot find any way to get the progress bar to restart itself. I have tried many methods, none of which have worked. I'll update this post with my code if necessary, but I'm using the code straight from the user docs, and all the variations I've tried would take three or four screen scrolls....

The best I've been able to get is a single progress bar that goes to and just stays at 100%, and the worst is multiple bars that pop in one under another, still at 100%, or no progress bars at all; it depends on how you look at it as to which is worse...

I've tried resetting the init values with $pb->configure() but I get a "tied" error and perl exits...
<snip>

untie attempted while 1 inner references still exist at C:/Perl/site/l +ib/Tk/ProgressBar.pm line 306. Can't call method "pack" on unblessed reference at myscript.pl line 43 +6.
</snip>

Any advice, hints, pointers appreciated...

Thank you,
amonotod


In reply to Tk::ProgressBar --Reset it? by amonotod

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.