<div><div>Hi,<br><br>Changing annotate.py and adding a &quot;disabled&quot; attribute, as you said, <br>is not the best solution. Also writing custom render methods is lots of work<br>and error prone. The best way I think is adding custom attributes to '
annotate.Typed'.<br>custom_attributes dictionary is a good solution. By this way adding any attribute is easy.<br>But since it should be done at nevow level, I will prefer writing custom render methods <br>to the needed widgets.
<br><br>Thanks for all your help.<br>Regards, <br><br>Suha<br><br><br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">As far as I know, it is impossible to add custom attributes without
<br>writing your own renderer. This is unfortunate because it means you<br>can end up with a bunch of very similar rendering classes. (Although<br>if you look at what happens to keyword arguments in annotate.Typed,<br>you'll see it'd be reasonably easy to pass in custom attribute
<br>arguments and access them in your custom renderer).<br><br>An alternative, if you don't mind running with a customized formless,<br>is altering annotate.py so that your Typed accepts a &quot;disabled&quot;<br>argument. You could then alter 
webform.py so the TypedRenderers there<br>check this value and if appropriate add the attribute in.<br><br>This isn't a brilliant solution either though, as I can't see a<br>reasonable way to do this in one place for all of the
<br>TypedRenderers. You'd need to alter each of them that you wanted to be<br>able to use the attribute. Of course, when you decide to add another<br>custom attribute, you need to do the same all over again. :)<br><br>Perhaps it would be nice if formless had a way for you to tell it to
<br>add particular attributes... a custom_attributes dictionary to<br>annotate.Typed for instance. It'd be very handy in situations like<br>this, but could be abused to go against formless's idea of seperating<br>the argument types from the way they're rendered. Comments on this
<br>would be appreciated.<br><br>Cheers and hope this helps,<br><br>Steven Holmes<br><br><br>_______________________________________________<br>Twisted-web mailing list<br><a href="mailto:Twisted-web@twistedmatrix.com">Twisted-web@twistedmatrix.com
</a><br><a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web</a><br></blockquote></div><br><br clear="all"><br>-- <br><br>Suha ONAY<br><br>Likya Yazılım ve Bilişim Hizmetleri 
Ltd.Şti.<br>Kosgeb Teknoloji Geliştirme Merkezi<br>ODTÜ Teknokent No:219<br>06531 Ankara - TÜRKİYE<br>Tel :: (312) 210 13 00-217<br>Fax :: (312) 210 13 09<br>Web ::&nbsp;&nbsp;<a href="http://www.likyabilisim.com">www.likyabilisim.com
</a><br>