--- On Thu, 9/24/09, Dominique Devienne <ddevie...@gmail.com> wrote:
> From: Dominique Devienne <ddevie...@gmail.com> > Subject: Re: if/unless Attributes > To: "Ant Developers List" <dev@ant.apache.org> > Date: Thursday, September 24, 2009, 12:15 PM > On Thu, Sep 24, 2009 at 10:46 AM, > Stefan Bodewig <bode...@apache.org> > wrote: > > On 2009-09-24, Dominique Devienne <ddevie...@gmail.com> > wrote: > >> we have ${toString:foo}, we might as well call it > ${toBoolean:foo} to > >> be consistent, > > > > toString applies to project references, not > properties, so they would > > not be as symmetric as they look. > > True. Which makes me think ${toBoolean:ref} would / should > evaluate to true or > false when the reference is defined or not. --DD Okay, the evaluator *I* am talking about :) will evaluate a string using Project.toBoolean(String) (if you want to evaluate another property use the NestedPropertyExpander and go for it). So, very basically, what I currently have is ${boolean:[on|yes|true]} evaluates to Boolean.TRUE. Alternatives: ${boolean:true} ${toBoolean:true} //asymmetric to toString:ref ${isTrue:true} ${booleanValue:true} ...others? -Matt > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org > For additional commands, e-mail: dev-h...@ant.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org