In article <[EMAIL PROTECTED]>,
 "Eric Brunel" <[EMAIL PROTECTED]> wrote:

>You should now see why it works here: your first tkFont.Font is remembered at 
>Python level in a variable. So it is not discarded once the tag_config is 
>over. So the second tkFont.Font is not allocated at the same location, so it 
>doesn't have the same id, and it doesn't have the same name at tcl level. This 
>is the general solution to the problem: keep your fonts in Python variables, 
>so they won't be discarded and their names will never be re-used.

Yes. I consider this dangerous behavior, by the way and submitted a 
patch (that was not accepted) that would prevent this garbage collection.

tkFont is Tkinter's interface to tk named fonts. If you create a tkFont 
instance for a named font and then let it disappear, the named font 
disappears, even if other tkFont instances exist that map the same named 
font.

-- Russell
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to