[Tutor] Checking if a GtkEntry is empty

Anthony Papillion papillion at gmail.com
Sat Feb 25 00:49:17 CET 2012


On Fri, Feb 24, 2012 at 5:10 PM, Prasad, Ramit
<ramit.prasad at jpmorgan.com> wrote:
>
> Please post a more significant code sample as I have no idea from this,
> but at least one of those should have given you an error. Always include
> the full error (including stacktrace) you get from Python. Use copy/paste
> and do not try and retype or rephrase it. Do not attach a file as many
> users
> of this list do not receive attachments.

Hi Ramit,

Thanks for the welcome. Basically, that's actually the code. But here
is the complete function that includes the code:

def on_btnSearch_click(self, data=None):
    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?

Thanks!
Anthony


More information about the Tutor mailing list