I have done a little further work on my patch to allow nested elements to have Project type as a constructor.
If the object contains both add<Element>() and create<Element>(), the add<Element>() method is used. example: <typedef myfileset mypath anttest etc ..> <copy todir="output"> <fileset ant-type="myfileset" dir="src" newattribute="MyFileSet attribute"/> </copy> <anttest> <path ant-type="mypath" path="build.xml" newattribute="MyPath attribute"/> </anttest> I will upload the modified patch over the weekend. Peter On Friday 02 May 2003 10:07, Stefan Bodewig wrote: > On Wed, 30 Apr 2003, Costin Manolache <[EMAIL PROTECTED]> wrote: > > Can you explain again what's wrong with create ? I think I missed > > it... > > You can't pass in a subclass of the type returned by the createXYZ > method as the object creation happens inside the task. If you want to > use a subclass of Path named mypath, you can't use it in tasks that > use createPath for the nested <path> element. > > > My understanding was that whatever is in use today will continue to > > work the same, we just add a new pattern at the end. > > Yes, with the caveat that polymorphism doesn't work for the createXYZ > case. > > Stefan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED]