Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

right now I'm doing the 'create your first ubuntu app' youtube tutorial. I'm trying the text entry box and nothing comes up when I enter text. Here's my code,

self.urlentry = self.builder.get_object("urlentry")
def on_urlentry_activate(self, widget):
        print "woo!"

when I press enter, or any other button, it does not display 'woo' on the terminal/Command line.

share|improve this question
1  
Not having any experience with quickly, I think you need to somehow attach the event handler (on_urlentry_activate) to the control (self.urlentry) –  Sergey Jan 5 '13 at 3:41
    
Could you explain that a little more. I tried attaching it and the command line said syntax error. –  user116943 Jan 5 '13 at 4:00
    
Actually, I was wrong - I watched the video and it seems that in Quickly those event handlers are found "automagically", no need to bind them explicitly. It would be helpful if you provided more code. –  Sergey Jan 5 '13 at 4:18
    
Alright here is my code. It's exactly the same as his. –  user116943 Jan 5 '13 at 4:25
    
Have you connected urlentry to on_urlentry_activate using glade? –  Tachyons Jan 5 '13 at 4:26
show 3 more comments

1 Answer 1

Had a similar problem where I couldn't type in the text entry field as well as the function not working as mentioned above.

My fix was under the common tab for the text entry widget, "can focus" = Yes

I can now enter text and the function runs.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.