'NoneType' object has no attribute 'bind'
Alex Willmer
alex at moreati.org.uk
Thu Oct 28 07:04:28 EDT 2010
On Oct 28, 11:24 am, Alex <sigma.z.1... at gmail.com> wrote:
> hi there, I keep getting the message in the Topic field above.
>
> Here's my code:
>
> self.click2=Button(root,text="Click Me").grid(column=4,row=10)
> self.click2.bind("<Button-1>",self.pop2pop)
>From reading the Tkinter docs grid doesn't itself return a control. So
I think you want this:
self.click2 = Button(root, text="Click Me")
self.click2.grid(column=4, row=10)
self.click2.bind("<Button-1>", self.pop2pop)
However, that's totally untested so don't take it as gospel.
> def pop2pop(self,event):
>
> print("Adsfadsf")
> newpop=IntVar()
> newpop=self.PopSize.get();
>
> what am I doing wrong?
>
> cheers,
>
> Alex
More information about the Python-list
mailing list