My task reference is null after making the change from
        AntStructure task = new AntStructure();
        task.setProject(project);
   to
        AntStructure task =(AntStructure) 
project.createTask("antstructure");

Why is this?   The former implementation did work.
Perhaps "antstructure" is not recognised?  I also tried "AntStructre".
Note: The Project Javadoc does not specify the return type in this 
scenario.


T Master.




On Tue, 18 Jun 2002 00:11:49 Stefan Bodewig wrote:
> On Mon, 17 Jun 2002, Hal Hildebrand <[EMAIL PROTECTED]>
> wrote:
> 
> >         ExecTask exec = new ExecTask();
> >         exec.setProject(project);
> 
> The preferred way would be
> 
>     ExecTask exec = (ExecTask) project.createTask("exec");
> 
> Stefan

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

Reply via email to