[Tutor] Tutor Digest, Vol 83, Issue 83

David Holland davholla2002 at yahoo.co.uk
Wed Jan 19 23:03:19 CET 2011


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, tutor-request at python.org <tutor-request at python.org> wrote:



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

Message: 7
Date: Wed, 19 Jan 2011 17:59:40 -0000
From: "Alan Gauld" <alan.gauld at btinternet.com>
To: tutor at python.org
Subject: Re: [Tutor] Problems passing a parameter in a GUI
Message-ID: <ih78qf$ecu$1 at dough.gmane.org>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
    reply-type=original


"David Holland" <davholla2002 at yahoo.co.uk> 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  -  Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor


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



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110119/07b73808/attachment-0001.html>


More information about the Tutor mailing list