Paweł Gdula | 22 May 15:46
Picon
Gravatar

[groovy-user] Strange problem

I have strange problem: i have date in db like 2012-05-06 00:00:00 (midnight), but when i query for it with usage of groovy.SQL i have 2012-05-07 00:00:00 (shifted by one day). Is this kind of misconfiguration from my side? Example script:


<at> GrabConfig(systemClassLoader=true)
<at> Grab(group='postgresql', module='postgresql', version='8.4-702.jdbc4')
import org.postgresql.Driver
import groovy.sql.Sql

def PSQL_SERVER = 'localhost'
def PSQL_DB = '****'
def PSQL_LOGIN = '****'
def PSQL_PASSWORD = '****'

def psql = Sql.newInstance("jdbc:postgresql://${PSQL_SERVER}/${PSQL_DB}", PSQL_LOGIN, PSQL_PASSWORD, "org.postgresql.Driver")
def row = psql.firstRow('select published_from from brochure where id = 296218261')

Cheers

Paweł 
Kenneth Kousen | 21 May 13:07
Gravatar

[groovy-user] Groovy-Eclipse compiler plugin for Maven replacing gmaven

There have been some hints on this list that the Groovy-Eclipse compiler plugin for Maven http://groovy.codehaus.org/Groovy-Eclipse+compiler+plugin+for+Maven is eventually going to become the primary option for using Groovy with Maven.


1. Is that true?

2. When is it likely to happen? Will it be part of the Groovy 2.0 transition, or unrelated?

3. Is GMaven under development any more?

4. Why doesn't either option generate a decent Eclipse project? When I run the eclipse:eclipse target, Eclipse doesn't even understand that the result is a Groovy project, much less get the paths configured properly. It's a real disaster, especially considering how easy that is to do with Gradle.

I have some clients that have to use Maven instead of Gradle, and they're having a tough time introducing Groovy because the Maven support is, at best, awkward, and, at worst, unusable.

Am I missing something?

Thanks,

Ken
--
Kenneth A. Kousen
President
Kousen IT, Inc.

Russel Winder | 19 May 12:46
Picon
Gravatar

[groovy-user] IntelliJ IDEA and @Canonical

Has anyone seen problems with IntelliJ IDEA stub creation for private
inner classes marked as @Canonical?

I have some code that compiles and tests as expected using command line
Gradle, and Gradle used command line style from within IntelliJ IDEA,
but which generates stubs that cause compilation errors using the built
in IntelliJ IDEA compilation system.

My hypothesis is that the problem is with IntelliJ IDEA, but before
taking the time to create a suitable bug report, I'm just doing a straw
poll in case this is a well known issue.

Thanks.

--

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder <at> ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@...
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
Andres Almiray | 18 May 19:42
Picon
Gravatar

[groovy-user] [ANN] Griffon in Action update

Hey Groovy users,

As you may know, Andres, Danno and Jim are writing a book for Manning Publications called "Griffon in Action". A comprehensive tutorial written for Java developers who want a more productive approach to UI development.

We'd like to offer you a 39% discount on the book using the Promotional code 12gia39 at manning.com only.
The final eBook will release next week and is sold exclusively at manning.com.
If you buy the print book now from Manning your copy will ship and arrive before you can buy it in the stores!

We would also appreciate other support for Andres, Danno and Jim. Please join our
Twitter feed <at> Manningsbooks and let us know what you think!. Author Forum access is also available once you
purchase the MEAP.

If you have any questions please contact me at cagi <at> manning.com.
Have a GREAT day.
Candace Gillhoolley
Evgeny Goldin | 18 May 13:18
Picon
Gravatar

[groovy-user] MarkupBuilder.getMkp() return type

Hi,

I was wondering why MarkupBuilder.getMkp() return type is Object rather than MarkupBuilderHelper?
Thanks!

Warm regards,
Evgeny


Manuel Bernhardt | 18 May 00:45
Picon
Gravatar

[groovy-user] Deadlock when using Groovy with Akka / Play 2

Hi,

I'm trying to track down the root cause of a deadlock that happens
when using Play 2, Akka, and Groovy. We have a component that makes
use of Groovy for data transformation and that I try to call inside of
Akka actors in Play 2, so as to run the computations concurrently.

One example of a recent stacktrace: https://gist.github.com/2722048

The discussion about this on the Play 2 issue tracker:
https://play.lighthouseapp.com/projects/82401-play-20/tickets/470-deadlock-in-dev-mode#ticket-470-19

I'm not entirely sure that this is a Groovy issue, however I'm
starting to feel somewhat desperate and hope someone here would be
able to shed some light on what is going on.

Thanks!

Manuel

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

    http://xircles.codehaus.org/manage_email

Jamie Echlin | 17 May 21:51
Picon
Gravatar

[groovy-user] map as interface with overloads...

Hi -

Is it possible using some groovy-magic to *not* call super in the first line of an overloaded constructor? My problem is that my groovy class subclasses a class in a third-party package, and I want to support more than one version, and the base class constuctor signature has changed between versions. So I'd like to do something like create the ctor args in a static initialiser... then call the ctor with a list or something. Possible? Or maybe I can .invoke the constructor from the super class... I guess that would have the same effect as super()? (Except I got compilation errors).

Anyway, falling at the first hurdle, I thought I would create a map as interface based on enumerating the methods of the interface, and delegate all to what would be the base class except one method. But some of the methods are overloaded, and of course the method names are the map keys, which are then duplicated. So I don't understand how this can work with overloads.  Any ideas on this?

cheers, jamie

sterg | 17 May 14:22
Picon

[groovy-user] Native BLAS in jlabgroovy

Hi all,

I updated Glab (or jlabgroovy), http://code.google.com/p/jlabgroovy/, to
use native BLAS through the JBLAS library.
Speedups are 3-5 times faster tha Java.

However, for Win64 the JBLAS shipped native BLAS .dll seems not to work
(for Win32 is OK).
Does anyone knows why?

Regards

Sterg

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

    http://xircles.codehaus.org/manage_email

rgarcia | 17 May 03:52
Picon

[groovy-user] @TypeChecked closure definition does not recognize Closure methods/properties inside a closure definition

Hi,

Shouldn't the compiler be able to recognize the property and method from
Closure instead of failing?

@TypeChecked
class StaticGroovy {
def test() {
   def cls = {  [ this, delegate, getOwner() ] }
}

--
View this message in context: http://groovy.329449.n5.nabble.com/TypeChecked-closure-definition-does-not-recognize-Closure-methods-properties-inside-a-closure-definin-tp5709826.html
Sent from the groovy - user mailing list archive at Nabble.com.

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

    http://xircles.codehaus.org/manage_email

bgoetzmann | 16 May 09:42

[groovy-user] Problem with a Closure expression binding in GroovyFX

Hello,

Using the very interesting GroovyFX module, this code snippet works well:

def rnd = new Random()
def spreadProp = new SimpleDoubleProperty(rnd.nextDouble())

text(text: "GUG!", style: "-fx-font-size: 80pt",
                onMouseMoved: { spreadProp.value = rnd.nextDouble() }) {
    fill linearGradient(endX: 0, stops: [cyan, dodgerblue])
    effect dropShadow(color: dodgerblue, radius: 25, spread:
bind(spreadProp))
}

This code works well: when the mouse cursor moves on text, the DropShadow's
spread property is automatically modified because spreadProp changes, thanks
to the bindind used (here with bind(spreadProp)).

But it doesn't work if I want to use a binding Closure instead (no error,
but nothing appens), and I don't know why:

text(text: "GUG!", style: "-fx-font-size: 80pt",
                onMouseMoved: { spreadProp.value = rnd.nextDouble() }) {
    fill linearGradient(endX: 0, stops: [cyan, dodgerblue])
    effect dropShadow(color: dodgerblue, radius: 25, spread: bind {
spreadProp.value })
}

As the spreadProp changes, the Closure binding expression should be
reevaluated (in order to change DropShadow's spread property).

Any idea?

Cheers,

Bertrand.

--
View this message in context: http://groovy.329449.n5.nabble.com/Problem-with-a-Closure-expression-binding-in-GroovyFX-tp5709800.html
Sent from the groovy - user mailing list archive at Nabble.com.

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

    http://xircles.codehaus.org/manage_email

Peter | 15 May 21:40
Picon

[groovy-user] @TypeChecked on a range

Hi,

First of all, let me say that i really like the static type checking 
stuff. Thanks for developing this feature.

Now the question:

     (6..9).find { int i -> i > 7 }

fails with the following message:

Reference to method is ambiguous. Cannot choose between 
[MethodNode <at> 1638726193[java.lang.Object find(groovy.lang.Closure)], 
MethodNode <at> 593352976[java.lang.Object find(groovy.lang.Closure)]]

Can anyone explain what is the problem here and how to fix it?

At first, I thought the compiler is confused about the type of (6..9) 
as

     [6, 7, 8, 9].find { int i -> i > 7 }

works fine.
However,

     List list = (6..9)
     list.find { int i -> i > 7 }

nor

     List<Integer> list = (6..9)
     list.find { int i -> i > 7 }

compiles (with static type checking).

Anyone?

Keep up the good work!
Regards
Peter

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

    http://xircles.codehaus.org/manage_email


Gmane