From: SourceForge.net <no...@so...> - 2009-11-19 23:39:22
|
Bugs item #2900796, was opened at 2009-11-19 14:52 Message generated for change (Comment added) made by jenglish You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=2900796&group_id=12997 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 88. Themed Tk Group: current: 8.5.8 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jeremy Cowgar (jeremy_c) Assigned to: Joe English (jenglish) Summary: ttk widgets do not initialize the textvariable Initial Comment: % entry .e -textvariable e % info exists e 1 % ttk::entry .e -textvariable e .e % info exists e 0 This requires you to either initialize it ahead of it's use or requires you to check info exists before any use of the variable. ---------------------------------------------------------------------- >Comment By: Joe English (jenglish) Date: 2009-11-19 15:39 Message: This behaviour is intentional, sensible, and consistent. The policy for linked variables (-textvariable, -variable, etc.) is: (1) The widget state reflects the value of the linked variable; and, (2) Widgets update linked variables in response to user input. The ttk::* widgets use a stronger policy: (2') widgets *only* update linked variables in response to user input. The core widgets mostly follow this policy as well, and in the cases where they don't it inevitably leads to counterintuitive behaviour. ---------------------------------------------------------------------- Comment By: Mark Janssen (mpc_janssen) Date: 2009-11-19 14:56 Message: This behaviour is different from the Tk entry widget which does initialize the textvariable. So even if there is a good reason for this behaviour, the fact that it's different from the behaviour in Tk adds an extra caveat for porting Tk code to Ttk. I am curious what reason could be so grave that the difference is justified. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=2900796&group_id=12997 |