Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Thanks BrowserUk for your very detailed explanations.

I'm amazed that we're facing this problem at all: if, for example, I obscure the Firefox window into which I'm currently typing, then reveal it again, it redisplays exactly as you would expect; I am sure that the Firefox code doesn't have to contain things like sub-second checking loops just to redisplay the contents of its own window. Surely the task of redrawing a window when it is revealed is down to the window manager, not the application whose window it is? So why is Perl/Tk any different? Is this a "feature" of Tk, or is it something that has gone wrong in the Perl interface to it? You say this in the nature of GUIs - but this is so crazy that I find that difficult to believe, with all respect to you.

I'm also surprised that this problem, which must surely be one that many many people will have faced, doesn't appear to have a standard workaround, let alone a fix.

Regarding the choices you list, I agree that (1) is not nice. I am very uncomfortable with (2), on the basis that making the machine do a lot of work just to wait for something to happen simply doesn't seem a sensible way to approach anything. I think your (3) is the only realistic option. I can't visualise in detail how this would be done, but I guess it could use Proc::Background as suggested by Anonymous Monk below. (However the 2 responses to that suggestion both involve the same kind of crazy loops as your choice (2)!)

I became diverted away from this problem, hence the very late response to you, and I now find I cannot devote any more time to it. I'll finish writing my application without trying to display a Perl/Tk window in parallel with another application's window, so this issue will no longer arise.

Many thanks to everyone who has contributed to this.


In reply to Re^4: Perl/Tk window contents disappear when obscured then revealed by Another Ed
in thread Perl/Tk window contents disappear when obscured then revealed by Another Ed

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others about the Monastery: (11)
    As of 2018-06-18 17:36 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (110 votes). Check out past polls.