Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-16 Thread Frederic Rentsch
On Sat, 2012-07-14 at 20:10 -0700, rantingrickjohn...@gmail.com wrote: > On Thursday, July 12, 2012 1:53:54 PM UTC-5, Frederic Rentsch wrote: > > > The "hit list" is a table of investment titles (stock, funds, bonds) > > that displays upon entry of a search pattern into a respective template. > >

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-14 Thread rantingrickjohnson
On Thursday, July 12, 2012 1:53:54 PM UTC-5, Frederic Rentsch wrote: > The "hit list" is a table of investment titles (stock, funds, bonds) > that displays upon entry of a search pattern into a respective template. > The table displays the matching records: name, symbol, ISIN, CUSIP, Sec. > Any li

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-14 Thread Peter Otten
Terry Reedy wrote: > On 7/13/2012 4:24 PM, Frederic Rentsch wrote: >> On Fri, 2012-07-13 at 09:26 +0200, Peter Otten wrote: > >>> Another random idea: run your code on a more recent python/tcl >>> installation. > > That might have been clearer as python + tcl/tk installation. Yes, sorry; I mean

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-13 Thread Terry Reedy
On 7/13/2012 4:24 PM, Frederic Rentsch wrote: On Fri, 2012-07-13 at 09:26 +0200, Peter Otten wrote: Another random idea: run your code on a more recent python/tcl installation. That might have been clearer as python + tcl/tk installation. I next spent a day with an attempt to upgrade t

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-13 Thread Frederic Rentsch
On Fri, 2012-07-13 at 09:26 +0200, Peter Otten wrote: > Frederic Rentsch wrote: > > > I'm sorry I can't post an intelligible piece that does NOT work. I > > obviously can't post the whole thing. > > How about a pastebin then? Or even bitbucket/github as you need to track > changes anyway? > >

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-13 Thread Peter Otten
Frederic Rentsch wrote: > I'm sorry I can't post an intelligible piece that does NOT work. I > obviously can't post the whole thing. How about a pastebin then? Or even bitbucket/github as you need to track changes anyway? > It is way too convoluted. "Convoluted" code is much easier to debug t

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-12 Thread Frederic Rentsch
On Tue, 2012-07-10 at 15:11 -0700, Rick Johnson wrote: > I've tried to condense your code using the very limited info you have > provided. I have removed unnecessarily configuring of widgets and > exaggerated the widget borders to make debugging easier. Read below > for Q&A. > > ## START CONDENSED

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-11 Thread Frederic Rentsch
On Tue, 2012-07-10 at 18:06 -0700, Rick Johnson wrote: > Also: > > Q3: Why are you explicitly setting the name of your "subFrame" widgets > instead of allowing Tkinter to assign a unique name?...AND are you > aware of the conflicts that can arise from such changes[1]? > I find custom-named widge

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-10 Thread Rick Johnson
Also: Q3: Why are you explicitly setting the name of your "subFrame" widgets instead of allowing Tkinter to assign a unique name?...AND are you aware of the conflicts that can arise from such changes[1]? Q4: Are you aware of the built-in function "enumerate"[2]? I see you are passing around inde

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-10 Thread Rick Johnson
I've tried to condense your code using the very limited info you have provided. I have removed unnecessarily configuring of widgets and exaggerated the widget borders to make debugging easier. Read below for Q&A. ## START CONDENSED CODE ## records = range(4) CNF_SUBFRAME = { 'bd':5, # rowFram

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-10 Thread Frederic Rentsch
On Mon, 2012-07-09 at 10:49 -0700, Rick Johnson wrote: > On Jul 9, 12:58 am, Terry Reedy wrote: > > When posting problem code, you should post a minimal, self-contained > > example that people can try on other systems and versions. Can you > > create the problem with one record, which you could gi

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-09 Thread Chris Angelico
On Tue, Jul 10, 2012 at 3:49 AM, Rick Johnson wrote: > ALL event handlers should marked as *event > handlers* using a prefix. I like to use the prefix "evt". Some people > prefer other prefixes. In any case, just remember to be consistent. > Also, event handler names should reflect WHAT event they

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-09 Thread Frederic Rentsch
On Mon, 2012-07-09 at 10:49 -0700, Rick Johnson wrote: > On Jul 9, 12:58 am, Terry Reedy wrote: > > When posting problem code, you should post a minimal, self-contained > > example that people can try on other systems and versions. Can you > > create the problem with one record, which you could gi

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-09 Thread Frederic Rentsch
On Mon, 2012-07-09 at 01:58 -0400, Terry Reedy wrote: > On 7/8/2012 5:19 PM, Frederic Rentsch wrote: > > Hi widget wizards, > > > > The manual describes the "event" attribute "widget" as "The widget > > which generated this event. This is a valid Tkinter widget instance, not > > a name. This at

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-09 Thread Terry Reedy
On 7/9/2012 1:49 PM, Rick Johnson wrote: On Jul 9, 12:58 am, Terry Reedy wrote: When posting problem code, you should post a minimal, self-contained example that people can try on other systems and versions. Can you create the problem with one record, which you could give, and one binding? Do y

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-09 Thread Rick Johnson
On Jul 9, 12:58 am, Terry Reedy wrote: > When posting problem code, you should post a minimal, self-contained > example that people can try on other systems and versions. Can you > create the problem with one record, which you could give, and one > binding? Do you need 4 fields, or would 1 'work'?

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-08 Thread Terry Reedy
On 7/8/2012 5:19 PM, Frederic Rentsch wrote: Hi widget wizards, The manual describes the "event" attribute "widget" as "The widget which generated this event. This is a valid Tkinter widget instance, not a name. This attribute is set for all events." Same in 3.3, with nice example of u

Tkinter.event.widget: handler gets name instead of widget.

2012-07-08 Thread Frederic Rentsch
Hi widget wizards, The manual describes the "event" attribute "widget" as "The widget which generated this event. This is a valid Tkinter widget instance, not a name. This attribute is set for all events." Ans so it is--has been until on the latest occasion "event.widget" was not t