-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 18, 2003 2:06 AM
To: [EMAIL PROTECTED]
Subject: RE: macrodef - do attributes as properties or substitutions


> > <macrodef name="macro">
> >     <attribute name="one"/>
> >     <attribute name="two" default="${one}"/>
> > </macrodef>
> > <macro one="hello"/>
> 
> I don't think we should need any special cludges just to support this 
> usecase. 8-)
> 
> Give two a completely bogus, impossible to be used in any real world 
> usage value and check for that.  Should be easier than comparing it to 
> a literal ${one} or @one or whathever.
> 
> <macrodef name="macro">
>     <attribute name="one"/>
>     <attribute name="two"
>       
> default="nobody-with-a-sane-mind-would-ever-want-to-use-this-value"/>
> </macrodef>

Nice idea - usually such nice words donīt come into my mind when Iīm 
programming :-) But the string comparison would be easier.

Jan

I have used a similar idea with a build file full of "template" targets that 
use a fileset reference.  The reference must be defined globally or the build 
will break, but only some of the users of the file of "templates" actually need 
the reference.  So, since references can be overridden, the solution is, 
similar to Stefan's, 

<fileset id="globaltlds" dir=".">
    <include name="no.real.file"/>
</fileset>

Later, a user of this buildfile can redefine the globaltlds reference, if it 
needs to, to something real.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to