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.

I am using Quickly to make a browser application. However,when i write the url example:www.google.com , and press enter. it does not go to the site.

This is my Python program:

# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
### BEGIN LICENSE
# This file is in the public domain
### END LICENSE

import gettext
from gettext import gettext as _
gettext.textdomain('ubrowser')

from gi.repository import Gtk, WebKit # pylint: disable=E0611
import logging
logger = logging.getLogger('ubrowser')

from ubrowser_lib import Window
from ubrowser.AboutUbrowserDialog import AboutUbrowserDialog
from ubrowser.PreferencesUbrowserDialog import PreferencesUbrowserDialog

# See ubrowser_lib.Window.py for more details about how this class works
class UbrowserWindow(Window):
    __gtype_name__ = "UbrowserWindow"

    def finish_initializing(self, builder): # pylint: disable=E1002
        """Set up the main window"""
        super(UbrowserWindow, self).finish_initializing(builder)

        self.AboutDialog = AboutUbrowserDialog
        self.PreferencesDialog = PreferencesUbrowserDialog

        # Code for other initialization actions should be added here.

        self.refreshbutton = self.builder.get_object('refresh button')
        self.urlentry = self.builder.get_object('urlentry')
        self.scrolledwindow = self.builder.get_object('scrolledwindows') 
        self.webview = WebKit.WebView()
        self.webview.show()
    def on_refreshbutton_clicked(self,widget): 
        self.webview.reload()
    def on_urlentry_activate(self,widget):     
        Url = widget.get_text()
        self.webview.open(Url) 

what do i need to write to make it work?? and what i did wrong?

share|improve this question
2  
No idea what you are asking. Look at How to Ask a question to state you problem more clearly –  Meer Borg Apr 22 '13 at 7:40
    
Hi Daniel, Welcome to Ask Ubuntu! Please ask a separate question for further problems, do not deviate too much from your original question. Thanks! –  Aditya Apr 22 '13 at 11:09
    
BTW, I think this python code is after you had solved the problem. I would request you to edit it to reflect the code that was actually causing the problem. –  Aditya Apr 22 '13 at 11:15
    
no. thats the problem –  Daniel Apr 22 '13 at 13:44
    
Please don't edit your questions constantly. Now it's very confusing because your question changes. For your current problem, WebView requires a full uri, see my answer here for more details: askubuntu.com/a/282578/20837 –  Timo Apr 22 '13 at 14:31
add comment

closed as not a real question by Tachyons, Thomas W., dobey, Javier Rivera, Mitch Apr 22 '13 at 18:25

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

Quickly use python to run your application. The error you see come from the python interpreter, because line 39 of file UbrowserWindow.py contain

on_urlentry_activate Url-widget.get_text()

As there is a whitespace between on_urlentry_activate and Url, the python interpreter search for a variable named Url, which it found not. Perhaps you typed a variable name with a whitespace in front ?

But that's not all : the dash betwwen Url and widget will be interpreted as a minus symbol.

Never use whitespace, dash, plus, star... In your variable names. The only sensible choice is underscore (_)

On a side note, there is a Google+ community on Quicly where you might find help...

share|improve this answer
    
ok i fixed this. now its something else –  Daniel Apr 22 '13 at 7:50
add comment

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