On 23/02/12 10:35, lkcl luke wrote: > On Thu, Feb 23, 2012 at 8:18 AM, Jesse Vander Does > <[email protected]> wrote: > >> Hey there, >> >> I'm trying to get the pyjs from the git repo to load in chrome and I'm >> seeing an error I can't quite make sense of. I've compiled it and copied it >> into a local webserver. >> >> This is the traceback: >> >> TypeError: createFocusable0() takes no arguments (1 given) >> Traceback: >> pyjslib.py, line 196 >> pyjamas.HTTPRequest.py, line 50: >> if not hasattr(handler, 'onCompletion'): >> PageLoader.py, line 56: >> self.panel.createPage(self.title, self.purpose, text) >> website.py, line 138: >> self.fTabs.add(widget, title, True) >> pyjamas.ui.TabPanel.py, line 63: >> self.insert(widget, tabText, asHTML, self.getWidgetCount(), name) >> pyjamas.ui.TabPanel.py, line 83: >> self.tabBar.insertTab(tabText, asHTML, beforeIndex) >> pyjamas.ui.TabBar.py, line 133: >> self.insertTabWidget(item, beforeIndex) >> pyjamas.ui.TabBar.py, line 137: >> delWidget = ClickDelegatePanel(self, widget, self, self) >> pyjamas.ui.ClickDelegatePanel.py, line 34: >> self.focusablePanel = SimplePanel(Focus.createFocusable()) >> pyjamas.ui.Focus.py, line 47: >> >> >> There are a few things that are strange here. >> >> 1) "createFocusable0", note the zero, is not implemented in Focus.py, it >> simply a function with pass in side. Why's that even in the code? >> > platform overrides. > > >> 2) Inside of ClickDelegatePanel, its not even calling that version of the >> function, its calling the implemented one. >> 3) The error says that it takes no arguments, but one was given. line 34 in >> ClickDelegatePanel sure looks like it has no arguments. I though maybe it >> was a bound function; its not though. >> >> Whoa, whoa, wait a minute, I see. It was calling the implementation in >> Focus.safari.py. >> > correct :) > > >> line 47 in Focus.safari.py: return createFocusable0(ensureFocusHandler()); >> >> Removing the argument fixes my immediate problem. Does anyone know what was >> intended there, I can't tell from the commits or the code. >> > that should be: > > ensureFocusHandler() > return createFocusable0() > > l. Whoops! createFocusable0() should be createFocusable0(focusHandler). This needs changing in Focus.safari.py, Focus.mozilla.py, Focus.oldmoz.py and Focus.opera.py. I will create a patch file
Regards, Phil

