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.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to