Ah, progress. Thank you. My mindset had been "no globals" and I was only trying to make resources such as the new font in the screen that needed them.
As you point out, when a MainWindow invents a font, that font is available to all its children. But when I moved the fontCreate lines into the Toplevel window that was containing the Help button, I got the effect I wanted for the Help button but now that Toplevel (a child of the MainWindow) would not reinvoke because its redefinition of fonts would cause the same error.
Moving the definition of the fonts all the way back into the first MainWindow solves the problem since the MainWindow is only invoked once, upon initialization of the program. But this need to create a "global" font for some button a few Toplevels down doesn't feel "right"....
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.