So this would basically be a property collection/group?
Is there a reason you want to do this over defining global properties? I
could see this if you want to allow scoped properties, which only apply
to a target or task.
I think private/task-based property scoping is a good idea. A
Property/PropertyGroup Task could do this.
So you could do something like what you had below or this like this:
<project>
<property name="foo" value="1"/>
<target name="test1">
<localproperties>
<property name="foo" value="2"/>
</ >
<echo message="${foo}"/> <!-- results in 2 -->
</ >
<echo message="${foo}"/> <!-- results in 1 -->
</ >
If we changed how we set/get properties this would work seamlessly. I've
added a Parent property to the Element class. This replaces the un-used
Target property. It also works well with my new embedded task stuff.
Tomas, I think this may be different than what you were thinking. But
would something like this work?
> -----Original Message-----
> From: [EMAIL PROTECTED]
[mailto:nant-developers-
> [EMAIL PROTECTED]] On Behalf Of Tomas Restrepo
> Sent: Tuesday, June 18, 2002 9:38 PM
> To: 'Nant developer's list'
> Subject: [nant-dev] PropertySet
>
> Hi all!
>
> While talking to John Lam earlier tonight, it occurred to me that
> something
> like a FileSet, but that deals with properties would be very useful.
> Something like a "PropertySet", if you will.
>
> Basically, the idea would be to have nested elements, like filesets,
that
> defined properties/arguments for a given task. A natural example of it
> would
> be the Preprocessor Definitions used by many compiler-related tasks.
For
> example, one could do:
>
> <defines>
> <include name="DEBUG"/>
> <include name="VERSION" value="1.0.322"/>
> ...
> </defines>
>
> And so on ( the element names are just ideas.. something better than
> "include" would be much nicer).
>
> Another use would be replacing the "arg" element some task use that
seems
> to
> be hacked each time for each one of them.
> The idea would be not to have to reimplement it each time something
like
> this is needed, but instead to have something the NAnt runtime handles
for
> you, just like FileSets are.
>
> What do you guys think?
> --
> Tomas Restrepo
> [EMAIL PROTECTED]
>
>
>
>
------------------------------------------------------------------------
--
> --
> Bringing you mounds of caffeinated joy
> >>> http://thinkgeek.com/sf <<<
>
> _______________________________________________
> Nant-developers mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-developers
-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers