Book Update - Chapter 9 - Pyjamas and jsonrpc

65 views
Skip to first unread message

João Ventura

unread,
Nov 10, 2010, 7:16:06 AM11/10/10
to web2py-users
Hello,

just to mention that i've tried to implement the pyjamas example in
the book, chapter 9, http://web2py.com/book/default/chapter/09#JSONRPC-and-Pyjamas,
and i've got some errors, which i've corrected.
Some errors are typo errors, and one is of the new version of pyjamas.
So, i suggest to alter that exemple as follows, to work with the last
stable version of pyjamas 0.7.

in "views/default/todoApp.html", where is:
<meta name="pygwt:module" content="{{=URL('static','output/
todoapp')}}" />
should be:
<meta name="pygwt:module" content="{{=URL('static','output/
TodoApp')}}" />
because the original "TodoApp.py" which will be compiled to
"TodoApp.html" and not "todoapp" (lowcase)

in the same file, where is:
<script language="javascript" src="{{=URL('static','output/
pygwt.js')}}"></script>
should be:
<script language="javascript" src="{{=URL('static','output/
bootstrap.js')}}"></script>
because the initial javascript file of pyjamas is now "bootstrap.js".

Finally, in "static/TodoApp.py" (the fifth step), where is:
import pyjamas.ui.KeyboardListener
should be:
from pyjamas.ui import KeyboardListener
because the first doesn't work, and KeyboardLister is not anymore a
class in pyjamas 0.7, but a regular module

Now, with pyjamas 0.7, and web2py 1.88.2, this example works
perfectly!

Best regards,
João Ventura

mdipierro

unread,
Nov 10, 2010, 9:28:02 AM11/10/10
to web2py-users
where you able to fix it in the book online? I can make you editor if
you are not already.

On Nov 10, 6:16 am, João Ventura <joaojonesvent...@gmail.com> wrote:
> Hello,
>
> just to mention that i've tried to implement the pyjamas example in
> the book, chapter 9,http://web2py.com/book/default/chapter/09#JSONRPC-and-Pyjamas,

João Ventura

unread,
Nov 10, 2010, 1:02:29 PM11/10/10
to web2py-users
Hi again,

I can login in the book application, using my google credentials, but
I don't know how to edit the page, can't seem to find any edit button.
Googled for how to do it, but can't seem to find how.
I think I'm not editor already, but if you want, you can make me
editor, and I shall gladly edit that info myself.

Best whishes,
João Ventura

Daniel Aguayo

unread,
May 15, 2012, 9:37:23 AM5/15/12
to web...@googlegroups.com
fellows! almost 2 years later, this is not yet updated in the book (also, login is temporarily disabled)
personally, I'd really like to-have-more-documentation-about-this™

regards

Richard Vézina

unread,
May 15, 2012, 9:42:31 AM5/15/12
to web...@googlegroups.com
With what happen with pyjamas recently (see thread on python-list) I doubt that there will more work involve documenting pyjamas into web2py until the survive of pyjamas will be granted.

Richard

Massimo Di Pierro

unread,
May 15, 2012, 10:12:32 AM5/15/12
to web...@googlegroups.com
Agreed.

Anthony

unread,
May 15, 2012, 10:19:41 AM5/15/12
to web...@googlegroups.com
On Tuesday, May 15, 2012 10:12:32 AM UTC-4, Massimo Di Pierro wrote:
Agreed.

<nudge>Nevertheless, we need the book to be editable again so we can fix all the other errors that have been reported and start documenting newer features.</nudge>  :-)

Anthony

Massimo Di Pierro

unread,
May 16, 2012, 11:27:59 AM5/16/12
to web...@googlegroups.com
I promise. Tonight.
Reply all
Reply to author
Forward
0 new messages