Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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"....


In reply to Re: Re: Tk fontCreate, fontNames errors (and fontDelete seems messy) by ff
in thread Tk fontCreate, fontNames errors (and fontDelete seems messy) by ff

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-19 12:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found