Hello,
I am trying to process a number of similar properties
in a loop. To do this, I need to dynamically create
the property name reference, then get the value of
that property. (I need a two-pass evaluation, much
the way UNIX shell scripts process.) I thought the
"dynamic" attribute of the property task would do
that, but I have only been able to create the property
name. I cannot reference the underlying value.
I tried two forms of the property reference, with the
same result. Does NAnt support this type of
referencing?
THX in advance for any thoughts.
Curt Zarger
==============
<target name="propTest" >
<property name="A.string" value="This is the A
string"/>
<property name="B.string" value="This is the B
string" />
<property name="C.string" value="This is the C
string" />
<foreach item="String" in="A, B, C" delim=","
property="key" >
<property name="stringValue"
value="${key+'.string'}" dynamic="true"/>
<!-- <property name="stringValue"
value="${key}.string" dynamic="true"/>-->
<echo message="${key} value is ${stringValue}" />
</foreach>
</target>
====================
propTest:
[echo] A value is A.string
[echo] B value is B.string
[echo] C value is C.string
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Nant-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users