Support for static dynamic methods?

Hi all,

In my project, I use a lot of dynamic finders, eg: Project.list(). I made a typo, (I forgot the curly braces), and at runtime, Grails gave an exception about this. So, what I did was to add the list method to the dynamic properties. But now I get a warning: cannot reference non-static symbol 'list' from a static context.

This is my code:

 listProjects() {
        println "listProjects"
        Project.list().each {
            "+ ${it}"
        }

        return Project.list()
    }
]]>


Edited by: Erik Pragt on Jul 7, 2008 1:11 PM

4 comments
Comment actions Permalink

As far as I remember, static dynamic methods and properties are simply not supported now. Adding them should not be difficult though(a checkbox in UI for staticness with default checked if it is called with class qualifier). A request to JIRA for the guys' record please?

0
Comment actions Permalink

Done:

http://www.jetbrains.net/jira/browse/GRVY-1622

ps:how, and what, are you currently doing??

0
Comment actions Permalink

Implemented. You can try it!

0
Comment actions Permalink

That's great!! I'll try to give some feedback on it when I've got the chance I really appreciate the great work you guys are doing!!

0

Please sign in to leave a comment.