[EMAIL PROTECTED] wrote:
Nicola Ken Barozzi <[EMAIL PROTECTED]> wrote on 07/11/2002 05:48:41 PM:
>
[EMAIL PROTECTED] wrote:
>>
Is super.mytarget a 'special' keyword? Given that you're 'redefining'
that
target (mytarget), what does antcalling it do? This is confusing IMHO
for an end user.
Hmmm...
It works like in java.
Well java methods don't have dependencies..... and this will break
compatibility with all targets that are defined as 'super.XXXX'.
Hmmm...
super. is a special prefix.
If I redefine mycooltarget two times I can call the first version via
super.super.mycooltarget , and the second version super.mycooltarget .
Any suggestions on how it can be made better?
Don't use antcall and target..... add a new tag to call the overidden
one.....lots of other possibilities...??
Ok then how about:
(a)
<target name="mytarget" >
<dostuff1/>
<antcall target="mytarget" super="1"/>
<dostuff2/>
</target>
(b)
<target name="mytarget" >
<dostuff1/>
<super level="1"/> <!-- level is optional -->
<dostuff2/>
</target>
(c)
<target name="mytarget" allowoverride="true" >
<dostuff1/>
<super target="mytarget"/>
<dostuff2/>
</target>
(d)
<target name="mytarget" >
<dostuff1/>
<antcall target="mytarget" select="this|super|super.super|..."/>
<dostuff2/>
</target>
(e)
combinations of the above.
--
Nicola Ken Barozzi [EMAIL PROTECTED]
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>