On Monday 05 April 2010 16:01:43, Spencer Allain wrote:
> There is clearly some confusion concerning task creation and addition to
> tasks.  Both task abc, task abc {}, and task abc << {} create a task, and
> both will complain if one already exists (let's ignore overwrite: true for
> the moment).
>
> Consider the below definitions
>
> task bob << { println '7' }
> bob.doLast() { println '8' }
> bob { println '1' }
> bob { configure { println '2' } }
> bob { doLast { println '9' } }
> bob.doFirst { println '6' }
> bob { println '3' ; doLast { println '10' } ; doFirst { println '5' } }
> bob.configure { println '4' }

This is a great sample to point out the bunch of variants and how things work. 
I consider it worth to get integrated into userguide or wiki. Thanks!

Your sample showed me the error of my writing, as I learned from your post, 
what a "named closure" is. So with respect to your samples, I use number '7' 
for task creation and number '1' for configuration (beside doFirst and 
doLast - which I think are not source of any confusion).

kind regards

Geronimo

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to