Eric Brunel
2002-04-15 10:08:46 UTC
JB wrote:
[snip]
CURRENT is just a constant defined in this module with the string value
'current', so you just have to do a "from Tkinter import *" to use it. You
may also just do an "import Tkinter" and use Tkinter.CURRENT instead of
just CURRENT. In other words, don't look for magic here: CURRENT is just a
constant variable like any other one, and getting a NameError using it just
means that you didn't do the right things to get it properly defined...
BTW, AFAIK, the method itemConfig on canvases does not exist; it's named
itemconfigure.
HTH
[snip]
self.canvasRef.itemConfig(CURRENT,
fill=self.HLColor)
When I run it this way, the events are definitely being handled, but I get
an error stating that "NameError: Global name 'CURRENT' is not defined".
Errrr, maybe you forgot to do "from Tkinter import *" in your module?fill=self.HLColor)
When I run it this way, the events are definitely being handled, but I get
an error stating that "NameError: Global name 'CURRENT' is not defined".
CURRENT is just a constant defined in this module with the string value
'current', so you just have to do a "from Tkinter import *" to use it. You
may also just do an "import Tkinter" and use Tkinter.CURRENT instead of
just CURRENT. In other words, don't look for magic here: CURRENT is just a
constant variable like any other one, and getting a NameError using it just
means that you didn't do the right things to get it properly defined...
BTW, AFAIK, the method itemConfig on canvases does not exist; it's named
itemconfigure.
HTH
--
- Eric Brunel <eric.brunel at pragmadev.com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com
- Eric Brunel <eric.brunel at pragmadev.com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com