--- On Thu, 9/24/09, Dominique Devienne <[email protected]> wrote:
> From: Dominique Devienne <[email protected]> > Subject: Re: if/unless Attributes > To: "Ant Developers List" <[email protected]> > Date: Thursday, September 24, 2009, 12:15 PM > On Thu, Sep 24, 2009 at 10:46 AM, > Stefan Bodewig <[email protected]> > wrote: > > On 2009-09-24, Dominique Devienne <[email protected]> > 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: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
