Pajamas and JavaScript: too much recursion

I am making an example of pajamas and getting this error:

TodoApp InternalError: too much recursion 

Here is a significant part of TodoApp.py from the related tutorial (please ignore the indent from 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 come across this?

Some articles on the Internet recommend setting up the code in a C ++ browser to fix this, but this does not seem safe to me.

+4
source share
1 answer

that TodoApp applies to pajamas 0.5.

for a working JSONRPC example, please look at any brilliant article: http://www.ibm.com/developerworks/web/library/wa-aj-pyjamas/

or just see examples of standard pajamas / jsonrpc.

+2
source

Source: https://habr.com/ru/post/1304045/


All Articles