jastrachan | 6 Apr 11:30 2005
Picon

Re: AW: Groovy JSR 1 released!

On 6 Apr 2005, at 10:25, Joerg Plewe wrote:
>  Maybe I should know, but I don't ... (still groovy newbie)
>
> In the following code snippet, the 'def' is mandatory now? Left it out
> before...

Yes - or you could use a concrete type of return if you wish - like 
'void' or 'Object' or 'ModelBuilder' or whatever.

> class ModelBuilder extends ContainerModel.Default
> {
> 	ContainerModel.Default mCurrent = this;
>
> 	def model( Closure closure )
> 	{
> 		closure.setDelegate( this )
> 		mCurrent = this
> 		closure.call()
> 		return this
> 	}
> }
>
>

James
-------
http://radio.weblogs.com/0112098/


Gmane