* kgi <[EMAIL PROTECTED]> [2006-10-31 11:58:35 +0200]:

> However, if one has stan-based rather than file-based XHTML, it's neither 
> documented nor obvious how this should be done. I've managed to get this far:
> 
>     from nevow import stan
>     ...
>     _athena = stan.Proto (
>         'athena:handler event="onkeypress" handler="keyPressed"'
>     )
>     ...
>     T.input ( type = "text", _class = "sw-input" ) [ _athena ]

stan.Proto takes a tag name, so you would really want
just stan.Proto('athena:handler'). However, there's already one of these
in athena, so you can just do:

from nevow import stan, athena
# ...
T.input(type='text', _class='sw-input')[
    athena.handler(event='onkeypress', handler='keypressed']
-- 
mithrandi, i Ainil en-Balandor, a faer Ambar

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

Reply via email to