Re: WebKit bindings crash when I implement the "window-object-cleared" signal



Hi,

The bindings should definitely be nicer when they do not understand void arguments. I think it should simply marshal them into PyCapsules which are "use at your own risk". I consider any crash to be a bug so if you can't find an existing ticket, feel free to log a new one here: https://bugzilla.gnome.org/enter_bug.cgi?product=pygobject

Have you thought about using a web framework for browser/python communication? http://wiki.python.org/moin/WebFrameworks

-Simon


On Mon, Jan 21, 2013 at 3:26 PM, Jack O'Connor <oconnor663 gmail com> wrote:
WebKitGtk+ docs for that signal

Here's what I'm doing in Python:

browser = WebKit.WebView()
def on_cleared(*args):
  pass
browser.connect("window-object-cleared", on_cleared)

And here's the crash from my terminal when that WebView is shown:

$ ./webkit.py                  
** (webkit.py:17260): CRITICAL **: Converting of type 'void' is not implemented
**
ERROR:/build/buildd/pygobject-3.4.0/gi/pygi-argument.c:2084:_pygi_argument_from_g_value: code should not be reached
zsh: abort (core dumped)  ./webkit.py

Is that expected? That signal has some gpointer parameters in the C documentation, and I wonder if that's what's causing the problem. My reason for doing any of this is that I'd ultimately like to expose a Python object to JS, so that the code in the page can call methods that I implement in Python. I read that "window-object-cleared" is the preferred place to set such an object in C at least, but maybe it's not possible from the Python bindings? Thanks for any suggestions.

-- Jack O'Connor

_______________________________________________
python-hackers-list mailing list
python-hackers-list gnome org
https://mail.gnome.org/mailman/listinfo/python-hackers-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]