Tk Source Code

View Ticket
Login
Ticket UUID: 2859912
Title: error recovery from multiple managers
Type: Bug Version: obsolete: 8.6b1.1
Submitter: quantifier Created on: 2009-09-16 11:06:35
Subsystem: 48. Geometry Management Assigned To: pspjuth
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2009-09-19 05:38:06
Resolution: Fixed Closed By: hobbs
    Closed on: 2009-09-16 16:15:48
Description:
If a master window has slave widgets managed by [pack], it won't accept slaves managed by [grid]
Trying to do so not only returns an error (the desired behaviour) but also creates graphical artifacts, and the offending widget will be incorrectly returned in [grid slaves]
The same happens with vice-versa: first [grid] and then [pack].

Example:
C:\>tclsh
% package require Tk
8.6b1.1
% pack [button .b -text btn]
% grid [label .l -text lbl]
cannot use geometry manager grid inside . which already has slaves managed by pack
% #at this point main window starts flickering
% pack slaves .
.b
% grid slaves . ;# should return empty string
.l
User Comments: pspjuth added on 2009-09-19 05:38:06:
Fixed in HEAD.

hobbs added on 2009-09-16 23:15:48:

allow_comments - 1

This is considered a notification runtime error and the developer should correct the state before continuing.  This used to hang Tk, so the warning is the improvement and it says "don't do that, start again".