I did understand the difference (it was me who did trying to write the program) 
however until James Reynolds provided me with the solution I could not think of 
a better way to do this.

Thanks for the help.

--- On Wed, 19/1/11, [email protected] <[email protected]> wrote:



------------------------------

Message: 7
Date: Wed, 19 Jan 2011 17:59:40 -0000
From: "Alan Gauld" <[email protected]>
To: [email protected]
Subject: Re: [Tutor] Problems passing a parameter in a GUI
Message-ID: <[email protected]>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
    reply-type=original


"David Holland" <[email protected]> wrote

> This works :-
>
> def create_widgets(self):
>      self.submit_bttn=Button(self, text="Submit", 
> command=self.reveal)
>
>
> But when I changed it to use a number I get an error message.
>
>def create_widgets(self,x):
>      x= self.submit_bttn=Button(self, text="Submit", 
> command=self.reveal(x))

Spot the difference in the commasnd parameter?

HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/




------------------------------

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor


End of Tutor Digest, Vol 83, Issue 83
*************************************



      
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to