<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Dear G. Willoughby,
<p>I think the problem is in the line:
<p>newName=Entry(frame1).grid(row=1,column=0)
<br># here newName is the return value of grid(), i.e, None, instead of
a Entry object.
<p>things may be better if you write as:
<br>newName=Entry(frame1)
<br>newName.grid(row=1,column=0)
<p>Cheers,
<br>Xia Xiao-Qin
<p>"G. Willoughby" wrote:
<blockquote TYPE=CITE>i'm trying to get user input from a Tkinter Entry
field, this is the code i
<br>am using:
<p>[snip...]
<p>def getNew():
<br>    result1=str(newName.get())
<br>    print result1
<p>[snip...]
<p>Button(frame1, text="Add New Entry", command=getNew).grid(row=0,column=0)
<br>newName=Entry(frame1).grid(row=1,column=0)
<p>[snip...]
<p>it somehow doesn't work, any ideas?
<p>P.S. no classes are used anywhere in this program.
<p>G. Willoughby</blockquote>
</html>