Tk Source Code

View Ticket
Login
2026-11-03
08:24 • Ticket [3f5867c9] Inconsistency between grid info, place info and pack info status still Closed with 6 other changes artifact: ddf6a207 user: oehhar
2026-11-02
17:49 • Closed ticket [3f5867c9]. artifact: 19d5692e user: nemethi
17:30
Fix for [3f5867c997]: Inconsistency between grid info, place info and pack info check-in: ebe87fbf user: csaba tags: trunk, main
2026-09-28
12:51 • Ticket [3f5867c9] Inconsistency between grid info, place info and pack info status still Open with 3 other changes artifact: b9a14e3c user: serhiy.storchaka
11:36 • Ticket [3f5867c9]: 3 changes artifact: ede79248 user: jan.nijtmans
11:35
Fix [3f5867c997]: Inconsistency between grid info, place info and pack info closed check-in: 320e533d user: jan.nijtmans tags: bug-3f5867c997
09:23 • Ticket [3f5867c9] Inconsistency between grid info, place info and pack info status still Open with 3 other changes artifact: 56feadc4 user: jan.nijtmans
2024-09-29
20:25
Revert [48a605ac]. This does not belong to bug [eb332846f3] but to [3f5867c997]. check-in: 9ed55d77 user: fvogel tags: bug-eb332846f3
20:24 • New ticket [3f5867c9] Inconsistency between grid info, place info and pack info. artifact: 6814c59b user: fvogel

Ticket UUID: 3f5867c997a98d045bd656439a218c78ab4053a1
Title: Inconsistency between grid info, place info and pack info
Type: Bug Version: core-8-6-branch
Submitter: fvogel Created on: 2024-09-29 20:24:22
Subsystem: 49. [grid] Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2026-11-03 08:24:14
Resolution: Fixed Closed By: oehhar
    Closed on: 2026-11-03 08:24:14
Description:

With an un-gridded, un-placed, un-packed window, [grid info] and [place info] return "" but [pack info] returns an error:

% package require Tk
8.6.9
% frame .f
.f
% grid info .f
% place info .f
% pack info .f
window ".f" isn't packed
%

This looks inconsistent.

Note that this inconsistency is enforced in the test suite:

  • the behavior of [pack info] in this case is tested by pack-17.2 (an error is the expected result)
  • the behavior of [grid info] in this case is tested by grid-5.4 (the empty string is the expected result)
  • the behavior of [place info] in this case is not tested

User Comments: oehhar added on 2026-11-03 08:24:14:

Great. As complementary info to this ticket: all three cases now return the empty string. This is now documented.

Thanks to the team! Harald


nemethi (claiming to be Csaba Nemethi) added on 2026-11-02 17:49:19:

Many thanks to Jan for the fix and to Serhiy for the review! Merged to main by commit [ebe87fbf]. Removed the unfinished sentence from doc/place.n and added a test for the case "content without a container", as suggested by Serhiy.

Due to the change in the functionality of pack, no backport to core-9-0-branch or core-8-6-branch is planned.


serhiy.storchaka added on 2026-09-28 12:51:56:

Returning an empty string from grid info and place info for an unmanaged window was not documented, so an alternative solution to make all three commands return an error should also be considered. Either way it is an incompatible change, which I would not backport to 8.6 and 9.0.

Review of the branch:

  • doc/place.n: an unfinished sentence "If the " is left after the new text.
  • place-9.13 tests a window that was never placed, which already returned an empty string. The new case in place info (content without a container) is not tested.


jan.nijtmans added on 2026-09-28 11:36:58:

Proposed fix [320e533d8dba4c6a|here]

Anyone who would like to review?