views:

334

answers:

1

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 recommend adjusting the C++ code of your browser to fix it, but that doesn't seem safe to me.

+1  A: 

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.