On May 2, 2005, at 5:47 PM, Peter Hunt wrote: Hello everyone, This is awesome, thank you for posting the link. I had planned on doing something similar to this for a long time, for both _javascript_ and ActionScript (flash bytecode instead of text script). However LivePage is just a hobby for me, so I never found time. I envision a world where we can write something like: Yep, this is almost exactly what LivePage looks like. def onButtonClick(client): client.sendScript("alert('hello world')") class Foo(LivePage): def render_clickable(self, ctx, _): return ctx.tag(> docFactory = loaders.htmlstr('<input type="button" nevow:render="clickable" />') I think I like your proposed syntax, with a "server" object in _javascript_; I'll mess around with adding support for something like it to LivePage. I'm not sure I like the magical proxy server-side interface too much. nevow.livepage.ClientHandle has a nice API which provides convenient methods for mutating the client side dom: set - replace an old node's contents with some new contents append - append a new node as a child of an old one prepend - prepend a new node as the first child of an old one alert - show the user an alert call - call a client side _javascript_ function with some arguments sendScript - send arbitrary _javascript_ for execution Donovan |
_______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com