Just a question:
would the following
attr-ref="${other-attr}"
have fetched the the value of the property with name "${other-attr}" or the
value a property named like the value of property "other-attr", i.e. nested
properties?
I was wondering because as I understand it the following would certainly not
have resolved the nested properties:
attr="${${other-attr}}"
While on the topic of referencing properties: will the referenced properties
(as "other-attr" in "${other-attr}") have to be defined in advance and the
respective value copied or will it be reevaluated on demand (every time
again)? Example:
<target name="print-ant">
<property name="msg" value="Message: ${foo}"/>
<property name="foo" value="ant"/>
<echo message="${msg}"/>
</target>
would result in "Message: ant" instead of "Message: ${foo}". A datatype
subclassing property (xproperty), where the value wasn't imutable, would
then result in different values of other properties referencing the
xproperty every time the referenced xproperty is changed. Example:
<target name="print-true-or-false">
<property name="msg" value="Message: ${foo}"/>
<xproperty name="foo" value="true"/>
<echo message="${msg}"/>
<xproperty name="foo" value="false"/>
<echo message="${msg}"/>
</target>
would give "Message: true" followed by "Message: false".
I'm not saying that this necessarily is the desired behaviour, I'm just
curious on how the resolution of referenced properties will work in the
future.
--
knut
> -----Original Message-----
> From: Darrell DeBoer [mailto:[EMAIL PROTECTED]
> Sent: Freitag, 5. April 2002 09:30
> To: Ant Developers List
> Subject: Re: [myrmidon] -ref vs ${}
>
>
> On Sun, 31 Mar 2002 14:02, Peter Donald wrote:
> > Hi,
> >
> > I just wanted to get peoples opinion on something I been
> playing with.
> > Currently in myrmidon the followin attributes will get
> identical values
> >
> > myAttribute="${value}"
> > myAttribute-ref="value"
> >
> > My question is do we need to support the "-ref" version of attribute
> > evaluation or is the first sfficient for all our use cases?
>
> +1 to removing the "-ref"syntax.
> --
> ciao,
> Daz
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>