Simple server/client application

jmdeschamps at gmail.com jmdeschamps at gmail.com
Mon Oct 24 20:28:11 EDT 2005


Simon Percivall wrote:
> You're calling the grid() method on the Entry object you're
> instanciating. Are you sure that the grid() method returns the Entry
> object so that you're actually binding it to self.myAddress?

The widget maker should do it in two steps instead of one.
So instead of:

self.myAddress=Entry(self.root,relief=SUNKEN).grid(row=1,column=1,sticky=W)
Make it thus:
      self.myAddress = Entry(self.root,relief=SUNKEN) # make it and
keep it here
      self.address.grid(row=1,column=1,sticky=W)      # grid it here
in the create_widgets method.




More information about the Python-list mailing list