开发者

Pyjamas & JavaScript: Too much recursion

开发者 https://www.devze.com 2022-12-22 17:26 出处:网络
I\'m doing a Pyjamas example and get this error: TodoApp InternalError: too much recursion Here is the significant portion of TodoApp.py from the linked tutorial (please ignore indentation from the

I'm doing a Pyjamas example and get this error:

TodoApp InternalError: too much recursion

Here is the significant portion of TodoApp.py from the linked tutorial (please ignore indentation from the copy/paste):

class TodoApp:
def onModuleLoad(self):
    self.remote = DataService()
    panel = VerticalPanel()

    self.todoTextBox = TextBox()
    self.todoTextBox.addKeyboardListener(self)

    self.todoList = ListBox()
    self.todoList.setVisibleItemCount(7)
    self.todoList.setWidth("200px")
    self.todoList.addClickListener(self)
    self.Status = Label("")

    panel.add(Label("Add New Todo:"))
    panel.add(self.todoTextBox)
    panel.add(Label("Click to Remove:"))
    panel.add(self.todoList)
    panel.add(self.Status)
    self.remote.getTasks(self)

    RootPanel().add(panel)

class DataService(JSONProxy):
def __init__(self):
    JSONProxy.__init__(self, "../../default/call/jsonrpc", 
                       ["getTasks", "addTask", "deleteTask"])

Has anyone else encountered this?

Some articles around the web开发者_Go百科 recommend adjusting the C++ code of your browser to fix it, but that doesn't seem safe to me.


that TodoApp was relevant for pyjamas 0.5.

for a working JSONRPC example, please see either rick hightower's absolutely brilliant article: http://www.ibm.com/developerworks/web/library/wa-aj-pyjamas/

or simply see the standard pyjamas examples/jsonrpc.

0

精彩评论

暂无评论...
验证码 换一张
取 消