GPath spread operator (*.) and another GinA example
Kristian Jones
Greenhorn
Joined: Jun 26, 2008
Posts: 6
posted
0
Hello again.
I'm slowly getting there with groovy and working through the example listings in GinA but this time I think I really have found an example that doesn't work with the latest version.
Listing : 7.23
I'm guessing this doesn't work because GinA assumes 1.0 and I'm on 1.6.5.
sum() is a method on Collection after it's been enhanced by the GDK. It was there in 1.0 but new over-ridden versions were included in 1.5 and above. You can read more about it and find many other hiddend Groovy nuggets in the GDK docs: http://groovy.codehaus.org/groovy-jdk. This doc will show you all the nifty features added to JDK classes / interfaces.
Have fun!
Dave
Author of Grails: A Quick-Start Guide
subject: GPath spread operator (*.) and another GinA example