, command=self.reveal(x))
File "/home/david/Documents/learnJava2010/v6c.py", line 24, in reveal
self.secret_text.delete(0.0, END)
AttributeError: Application instance has no attribute 'secret_text'
--- On Tue, 18/1/11, Dave Angel wrote:
From: Dave Angel
Subject: Re: [Tut
"David Holland" wrote
This works :-
def create_widgets(self):
self.submit_bttn=Button(self, text="Submit",
command=self.reveal)
But when I changed it to use a number I get an error message.
def create_widgets(self,x):
x= self.submit_bttn=Button(self, text="Submit",
command=sel
On 01/-10/-28163 02:59 PM, David Holland wrote:
Hi All,
I hope this makes sense
I am trying to write a GUI where you click on a button and each time
you click on the button it shows in the entry text how many times you
have clicked. However when I changed an earlier version of the code to
pass
I took another look at what you are trying to do, and if I wanted to count
the number of times the button was pressed in the same way you are trying I
would do something like this instead:
from Tkinter import *
class Application(Frame):
"""GUI App"""
def __init__(self, master):
You have other issues at play here, but to answer your question from below:
You are calling the method "reveal" prior to creating the global object
"secret_text"
You can try moving:
x= self.submit_bttn=Button(self, text="Submit", command=self.reveal(x))
below self.secret_text = ""
You w
Hi All,
I hope this makes sense
I am trying to write a GUI where you click on a button and each time
you click on the button it shows in the entry text how many times you
have clicked. However when I changed an earlier version of the code to
pass a parameter it errors.
This works :-
from Tkin