Iīm sorry if i donīt write correct.
My code is like this:

MyClass()

class MyClass:
     def __init__(self):
         btn = RadioButton(command=self.Function)
     def Function(self):
         print "Enter in the function"

python : 2.3.5
os: win 2K

When a do this, the function 'Function' is call. And i donīt want this.
Whatīs wrong ?
Thank you
Glauco

----- Original Message ----- 
From: "Delaney, Timothy C (Timothy)" <[EMAIL PROTECTED]>
To: "Glauco Silva" <[EMAIL PROTECTED]>; <python-list@python.org>
Sent: Monday, May 02, 2005 8:50 PM
Subject: RE: problem in the compiler ?


Glauco Silva wrote:

> when i creat a RadioButton and put a command = self.Function , this
> function is called in the creation of RadioButton. Itīs right this or
> itīs wrong ?

http://www.catb.org/~esr/faqs/smart-questions.html

I'm pretty sure I can guess exactly what the problem is. I suspect your code
looks somewhat like:

    btn = RadioButton(command=self.Function())

Follow the instructions in the above link and you should be able to work out
why this is wrong.

If I've failed to read your mind correctly, the above link should also teach
you how to make it easier for me to do so.

Tim Delaney




-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.1 - Release Date: 2/5/2005

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to