On 24/02/12 23:49, Anthony Papillion wrote:

Add a trace to see if the method ever gets called

def on_btnSearch_click(self, data=None):

       print "I'm in on_btnSearch_click"

     if btnSearch.get_text() == "":
         print "Nothing to search"
     else:
         print "I would do this search"


The code above does nothing. No error, no print, nothing. Any idea?

Where are you looking for the printout?
How are you running it?

If the message I added doesn't print you need to look at how you are associating the method with the widget event.

You don't show us enough code for us to tell.
In fact you still don't show us enough to answer the original question about how to reference btnSearch. we would need to see where btnSearch is created.

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

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

Reply via email to