Actually, this is not (or, more precisely, SHOULD not) be a WOConditional trait; the very same behaviour should be used for all .wod boolean bindings which contain a number object (say, for a WOHyperlink "disabled" binding, and for WOString "escapeHTML" binding, yadda yadda yadda...).
it's WOAssociation.booleanValueInComponent, but not every component uses this ... the implementation is:

instanceof Number = false if intValue() == 0, true otherwise
else instanceof String = false if ("no", "false", "nil", "null"), if the String is the String form of a number (0-9+.-), false if parseInt(..) == 0, true otherwise
else instanceof Boolean = boolean value
else not null = true
else null = false

If each of them does this for itself (and potentially in a different way than all the others), then the thing is much worse disaster I've thought :(
I suspect most of WO core uses this ... Wonder has a mix where some use ERXValueUtilities, which has a broader interpretation.

ms

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to