FormPanel error when trying to use example from pyjamas book #736

piet8stevens opened this Issue Jun 10, 2012 · 5 comments


None yet
2 participants

When I try to execute the from the examples directory, I get the following result:
~/pyjamas/examples/formpanel$ python FormPanelExample.pyset_main_frame <pyjd.pywebkitgtknew.Browser instance at 0xa436cec>
Traceback (most recent call last):
File "", line 79, in
File "", line 55, in onModuleLoad
File "/home/pstevens/pyjamas/library/pyjamas/ui/", line 30, in add
ComplexPanel.add(self, widget, self.getElement())
File "/home/pstevens/pyjamas/library/pyjamas/ui/", line 26, in add
self.insert(widget, container, self.getWidgetCount())
File "/home/pstevens/pyjamas/library/pyjamas/ui/", line 44, in insert
self.adopt(widget, container)
File "/home/pstevens/pyjamas/library/pyjamas/ui/", line 107, in adopt
File "/home/pstevens/pyjamas/library/pyjamas/ui/", line 138, in setParent
File "/home/pstevens/pyjamas/library/pyjamas/ui/", line 193, in onAttach
self.hookEvents(self.iframe, self.getElement(), self)
File "/home/pstevens/pyjamas/library/pyjamas/ui/", line 141, in hookEvents
self._onload_listener = mf.addEventListener(iframe, "load",
AttributeError: Browser instance has no attribute 'addEventListener'

Other examples such as Hello or FlowPanel do work.
I have done a git pull in order to get the latest versions of pyjs.
Running ubuntu 12.04.
Running 0.8.1~+alpha1 (that is what I get from CHANGELOG - not sure where else to get the version from).


anthonyrisinger commented Jun 12, 2012

which runtime/browser engine are you using, and what platform are you on (windows/mac/linux/...)?

Ubuntu 12.04
pyjs 0.8.1+alpha1
It happened when I run it outside of the browser.


anthonyrisinger commented Jun 13, 2012

are you using the .deb package from here:

... the native runtimes do not work out of the box, they require modified versions of WebKit/XULRunner. this may change in the near future, for WebKit anyway.

the Trident/Windows runtime works with the comtypes python package.


anthonyrisinger commented Jun 13, 2012

ah nevermind, i didn't realize you were the same person as the recent on-list question :-)

so, you are using the deb package, but you said you rebuilt it? correct? what have you done custom/etc or tried thus far? i haven't had a chance to rebuild pythonwebkit yet, but the native engines are a little fragile so i need to ensure your setup is not causing the issue.

--- Source/JavaScriptCore/wtf/gobject/GTypedefs.h.orig 2012-05-10 00:09:14.000000000 -0400
+++ Source/JavaScriptCore/wtf/gobject/GTypedefs.h 2012-05-10 00:06:13.000000000 -0400
@@ -52,7 +52,7 @@
typedef struct _GHashTable GHashTable;
typedef struct _GInputStream GInputStream;
typedef struct _GList GList;
-typedef struct _GMutex GMutex;
+typedef union _GMutex GMutex;
typedef struct _GPatternSpec GPatternSpec;
typedef struct _GPollableOutputStream GPollableOutputStream;
typedef struct _GSocketClient GSocketClient;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment