Sorry - one more FormPanel related issue that I alluded to in the title but
did not put in the body of the message: I was actually trying to get the
FormPanelDemo from the pyjamas book to work. When that did not work, I
tried to run FormPanelExample from the examples.
When I try to run FormPanelDemo from the pyjamas book, I get this error:
set_main_frame <pyjd.pywebkitgtknew.Browser instance at 0x961eaac>
Traceback (most recent call last):
File "/home/pstevens/workspace/Hello/Hello.py", line 68, in <module>
fop = FormPanelDemo()
File "/home/pstevens/workspace/Hello/FormPanelDemo.py", line 33, in
__init__
results = NamedFrame("results")
File "/home/pstevens/pyjamas/library/pyjamas/ui/NamedFrame.py", line 30,
in __init__
Frame.__init__(self, None, iframe, **kwargs)
File "/home/pstevens/pyjamas/library/pyjamas/ui/Frame.py", line 28, in
__init__
Widget.__init__(self, **kwargs)
File "/home/pstevens/pyjamas/library/pyjamas/ui/Widget.py", line 41, in
__init__
UIObject.__init__(self, **kwargs)
File "/home/pstevens/pyjamas/library/pyjamas/ui/UIObject.py", line 84, in
__init__
Applier.__init__(self, **kwargs)
File "/home/pstevens/pyjamas/library/pyjamas/ui/__init__.py", line 83, in
__init__
self.applyValues(**kwargs)
File "/home/pstevens/pyjamas/library/pyjamas/ui/__init__.py", line 95, in
applyValues
fn(args)
File "/home/pstevens/pyjamas/library/pyjamas/ui/Frame.py", line 38, in
setUrl
return DOM.setAttribute(self.getElement(), "src", url)
File "/home/pstevens/pyjamas/library/pyjamas/DOM.py", line 853, in
setAttribute
setattr(element, attribute, value)
TypeError: _wrap_corehtmliframeelement__set_src() argument must be string,
not None
Any assistance would be much appreciated.
Piet
On Saturday, June 2, 2012 12:49:45 PM UTC+2, Piet Stevens wrote:
>
>
> I am not sure when I should post here and when under pyjs issues under
> GitHub.
>
> When I try to execute the FormPanelExample.py 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 "FormPanelExample.py", line 79, in <module>
> app.onModuleLoad()
> File "FormPanelExample.py", line 55, in onModuleLoad
> RootPanel().add(self.form)
> File "/home/pstevens/pyjamas/library/pyjamas/ui/AbsolutePanel.py", line
> 30, in add
> ComplexPanel.add(self, widget, self.getElement())
> File "/home/pstevens/pyjamas/library/pyjamas/ui/ComplexPanel.py", line
> 26, in add
> self.insert(widget, container, self.getWidgetCount())
> File "/home/pstevens/pyjamas/library/pyjamas/ui/ComplexPanel.py", line
> 44, in insert
> self.adopt(widget, container)
> File "/home/pstevens/pyjamas/library/pyjamas/ui/Panel.py", line 107, in
> adopt
> widget.setParent(self)
> File "/home/pstevens/pyjamas/library/pyjamas/ui/Widget.py", line 138, in
> setParent
> self.onAttach()
> File "/home/pstevens/pyjamas/library/pyjamas/ui/FormPanel.py", line 193,
> in onAttach
> self.hookEvents(self.iframe, self.getElement(), self)
> File "/home/pstevens/pyjamas/library/pyjamas/ui/FormPanel.py", 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).
>
> Any ideas what is the problem?
>
> Thank you,
>
> Piet
>