Nick,

The "if" condition is evaluated, not the value of the property.

Gert

----- Original Message ----- From: "Nick Zigomanis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 16, 2004 7:06 AM
Subject: [Nant-users] dynamic properties and functions



Hi all,



I'm trying to set dynamic properties in my build file as shown below:



<property name="idl.out.dir" value="${bin.root}\Common" dynamic="true"
if="${string::contains(this.idl, 'Source\Common'}" />

<property name="idl.out.dir" value="${bin.root}\Data" dynamic="true"
if="${string::contains(this.idl, 'Source\Data'}" />



Essentially, all idl's under a specific source hierarchy (which is
tested by the string::contains function) are compiled to a single bin
directory.



However, in doing the above, I get the following error when running the
build script:



Property evaluation failed.

Expression: ${string::contains(this.idl, 'Source\Common'}

                                                ^^^^^^^^

                        Property 'this.idl' has not been set.



It seems that even though a dynamic property is specified, the function
tries to do an evaluation even before the property is being used, i.e.,
in this case, it is not dynamic.



Can anyone confirm this, or point out any problems in my approach, or
possibly, a better way to do this.



Thanks,

Nick.




------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to