I have a TK script that pops up a TopLevel window using a DynaTabFrame with a tab for a selectable set of categories
Each tab is pretty complex with a whole host of buttons, entries and labels.
Most of the time it works properly but if I pick the right combination of categories, the Toplevel will pop up empty with no widgets displayed.

The failing case is repeatable (but the case that fails seems to change when I update the code to add new debugging hooks etc..)
I have examined the Toplevel object in the debugger in the failed state and I can't see anything obvious between a fully populated window and the empty window.

I am using strict and warnings, and no warnings are reported in the failing case.

I also examined the failing/passing cases with WidgetDump. The content of that window is a bit overwhelming,
but it looks like the empty TopLevel is fully populated with all the tabs and widgets I'd expect to see

Is there a way to do a text based WidgetDump to a file so I can use tkdiff to compare the working vs non-working cases?

Can anyone think of any other debugging tips to track down what could be causing an empty topLevel window?

Update...
If I have a fully populated/working TopLevel window and I double click the dynatabframe element in the WidgetDump window
it becomes an empty non-functioning Toplevel window.
Not sure if thats a clue or just a red-herring

Update...
If I switch from DynaTabFrame to the Notebook widget, which i can do with a run-time option, It doesn't seem to break...
I noticed that when I used the DynaTabFrame I was adding an extra level of scrolled frame to each tab.
I removed that scrolled frame and packed everything directly into the tab and now it doesn't seem to break
(I did have to add a loop to raise all the tabs I created, one by one, to get the top level window to resize properly)

Since my "FIX" resulted from a guess, I have no real answer what was causing the problem,
I want to keep the question open...
Can anyone think of any other debugging tips to track down what could be causing an empty topLevel window?


In reply to Debugging Tk empty Toplevel window by boleary

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.