Re: [Zope] Existence and truth

2006-11-28 Thread Chris Withers
Paul Winkler wrote: On Tue, Nov 28, 2006 at 10:24:51PM +, Mark Barratt wrote: The radio inputs return name="listed" and value 0 or 1 If you change that radio input to name="listed:int" you'll get the behaviour you expect... cheers, Chris -- Simplistix - Content Management, Zope & Pyth

Re: [Zope] Existence and truth

2006-11-28 Thread Mark Barratt
Mark Barratt wrote: Paul Winkler wrote: This kind of thing is usually a mistaken type assumption. I bet your radiobutton is setting it to "0" rather than 0. Thanks. Yes it was. But neither value=0 (which I think is invalid XHTML), nor value="" makes any difference. OK, solved. value="" ac

Re: [Zope] Existence and truth

2006-11-28 Thread Mark Barratt
Terry Brown wrote: Hmmm, CGI only returns strings. Sometimes x*1 will give a number (0) even if x is a string ("0")... but I would have said your example should work... Yes, that's what i would have thought . I'll move this to the Plone users list - there may be some specific Plone evil in

Re: [Zope] Existence and truth

2006-11-28 Thread Terry Brown
Hmmm, CGI only returns strings. Sometimes x*1 will give a number (0) even if x is a string ("0")... but I would have said your example should work... Cheers -Terry x On Tue, 28 Nov 2006, Mark Barratt wrote: Paul Winkler wrote: This kind of thing is usually a mistaken type assumption. I b

Re: [Zope] Existence and truth

2006-11-28 Thread Mark Barratt
Paul Winkler wrote: This kind of thing is usually a mistaken type assumption. I bet your radiobutton is setting it to "0" rather than 0. Thanks. Yes it was. But neither value=0 (which I think is invalid XHTML), nor value="" makes any difference. Mark Barratt ___

Re: [Zope] Existence and truth

2006-11-28 Thread Paul Winkler
On Tue, Nov 28, 2006 at 10:24:51PM +, Mark Barratt wrote: > The radio inputs return name="listed" and value 0 or 1 > > This works OK, but in the radio input code, > > tal:attributes="checked python:test(listed,'checked',None); > > *always* returns 'checked' (snip) > So what basic fact/know

[Zope] Existence and truth

2006-11-28 Thread Mark Barratt
[profound subject: sorry the body may be less interesting] This is so basic, but any help would be appreciated. It's also a Plone site, but the problem is about basic tal behaviour so I hope it's appropriate: I have an attribute, 'listed' (a property of 'member') which I want the user to be