Bugs item #1677226, was opened at 2007-03-09 13:51 Message generated for change (Comment added) made by solidstubborn You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1677226&group_id=31650
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jacob Schlesinger (solidstubborn) Assigned to: Nobody/Anonymous (nobody) Summary: properties by default readonly ignoring the readonly option Initial Comment: I tried to implement a foreach loop for which I need some kind of counter. I tried to use a property which I "increase" by adding a '+'. But I get a warning "[property] Read-only property "test_counter" cannot be overwritten.". Regarding the documentation the readonly option should be set to "false" by default and I still get the error when setting it explicitly (also the overwrite option has no effect). I'm using the 0.8.5 release and tried it whith the latest nightly build. This is the test script I wrote followed by the output as comment: <!-- start of script --> <project name="list_test2"> <property name="test_list" value="a;b;c"/> <target name="test"> <property name="test_counter" value=""/> <foreach item="String" in="${test_list}" delim=";" property="sub"> <property name="test_counter" value="${test_counter}+"/> <echo message="${sub}${test_counter}"/> </foreach> </target> </project> <!-- [property] Read-only property "test_list" cannot be overwritten. test: [property] Read-only property "test_counter" cannot be overwritten. [property] Read-only property "test_counter" cannot be overwritten. [echo] a [property] Read-only property "test_counter" cannot be overwritten. [echo] b [property] Read-only property "test_counter" cannot be overwritten. [echo] c expected output: test: [echo] a+ [echo] b++ [echo] c+++ --> <!-- end of script --> The most weird about this is that it is not completely reproduceable. There are always errors that readonly properties can not be overwritten. But sometimes it works for some properties. ---------------------------------------------------------------------- >Comment By: Jacob Schlesinger (solidstubborn) Date: 2007-03-09 14:38 Message: Logged In: YES user_id=1739362 Originator: YES After a hint from a colleague using the visual studio plugin of nant i made some further tests and realisied, that this behaviour only occurs when starting from the nant gui. The script works fine with the visual studio plugin and started from console. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1677226&group_id=31650 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers