[Tutor] Help me.. problem in building calculator application
Asrarahmed Kadri
ajkadri at googlemail.com
Thu Oct 26 14:31:37 CEST 2006
Hi folks,
I am trying to build a rudimentary calculator application using Tkinter...
I have used one Entry widget for displaying the input and output data.
All this is put in a class.
The porblem is when I click teh '+' button, teh callback function is called
but it gives me an error message: AttributeError: 'str' object has no
attribute 'get'
I have defined a variable, self.str1 = StringVar() to bind it with the entry
widget and I am calling the function when + is clciked. The function is as
follows:
self.buttonPlu = Button(self.container3,text='+',command = lambda:
self.oprClick('+',*self.str1.get()))*
Can't we use the get() method to access the contents of the entry widget. Is
there any other way to access the contents of the entry widget....???
Thanks in anticipation.
Regards,
Asrar
--
To HIM you shall return.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061026/7e90f0dd/attachment.html
More information about the Tutor
mailing list