ImageTool plugin

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

ImageTool plugin

Bugzilla from corey_s@qwest.net


I installed grails-image-tools-1.0.zip into my project, as per
http://grails.org/ImageTools+plugin , but I'm getting an error when
trying to instantiate it from a domain class:


package my.package

class Image {

   // snip

   void upload() {

      def imageTool = new ImageTool()

      // ...
   }
}


  [groovyc] Compiling 2 source files
to /home/corey/.grails/1.0.3/projects/MyApp/classes
Compilation error:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
failed, /home/corey/MyApp/grails-app/domain/my/package/Image.groovy: 23:
unable to resolve class ImageTool
 @ line 23, column 23.
         def imageTool = new ImageTool()



Any ideas what's causing that, what I'm doing wrong?



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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: ImageTool plugin

burtbeckwith
ImageTool is in the default package, so you cannot reference it from a
package. You can just move the class to a subdirectory and change its package
accordingly.

Burt

On Friday 04 July 2008 7:24:41 pm Corey wrote:

> I installed grails-image-tools-1.0.zip into my project, as per
> http://grails.org/ImageTools+plugin , but I'm getting an error when
> trying to instantiate it from a domain class:
>
>
> package my.package
>
> class Image {
>
>    // snip
>
>    void upload() {
>
>       def imageTool = new ImageTool()
>
>       // ...
>    }
> }
>
>
>   [groovyc] Compiling 2 source files
> to /home/corey/.grails/1.0.3/projects/MyApp/classes
> Compilation error:
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
> failed, /home/corey/MyApp/grails-app/domain/my/package/Image.groovy: 23:
> unable to resolve class ImageTool
>  @ line 23, column 23.
>          def imageTool = new ImageTool()
>
>
>
> Any ideas what's causing that, what I'm doing wrong?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email



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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: ImageTool plugin

Bugzilla from corey_s@qwest.net
On Friday 04 July 2008 05:02:15 pm Burt Beckwith wrote:
> ImageTool is in the default package, so you cannot reference it from a
> package. You can just move the class to a subdirectory and change its
> package accordingly.
>

Thanks for the response!


You mean move the ImageTool.groovy from:

.../plugins/image-tools-1.0/src/groovy/ImageTool.groovy

to:

.../plugins/image-tools-1.0/src/groovy/imagetool/ImageTool.groovy

and add:

package imagetool

to the ImageTool.groovy?


Because that's not working.

( I also added 'import imagetool.ImageTool' to my Image.groovy domain class )

I end up with:

  [groovyc] Compiling 2 source files
to /home/corey/.grails/1.0.3/projects/MyApp/classes
Compilation error:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
failed, /home/corey/MyApp/grails-app/domain/my/package/Image.groovy: 23:
unable to resolve class imagetool.ImageTool
 @ line 3, column 1.
   import imagetool.ImageTool




> Burt
>
> On Friday 04 July 2008 7:24:41 pm Corey wrote:
> > I installed grails-image-tools-1.0.zip into my project, as per
> > http://grails.org/ImageTools+plugin , but I'm getting an error when
> > trying to instantiate it from a domain class:
> >
> >
> > package my.package
> >
> > class Image {
> >
> >    // snip
> >
> >    void upload() {
> >
> >       def imageTool = new ImageTool()
> >
> >       // ...
> >    }
> > }
> >
> >
> >   [groovyc] Compiling 2 source files
> > to /home/corey/.grails/1.0.3/projects/MyApp/classes
> > Compilation error:
> > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
> > failed, /home/corey/MyApp/grails-app/domain/my/package/Image.groovy: 23:
> > unable to resolve class ImageTool
> >  @ line 23, column 23.
> >          def imageTool = new ImageTool()
> >
> >
> >
> > Any ideas what's causing that, what I'm doing wrong?
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list, please visit:
> >
> >     http://xircles.codehaus.org/manage_email
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email



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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: ImageTool plugin

Bugzilla from corey_s@qwest.net
On Friday 04 July 2008 04:47:48 pm Corey wrote:
> On Friday 04 July 2008 05:02:15 pm Burt Beckwith wrote:
> > ImageTool is in the default package, so you cannot reference it from a
> > package. You can just move the class to a subdirectory and change its
> > package accordingly.
>


Ok, I had to run a 'grails clean' after I modified the plugin as you
suggested.

All is working - thanks!





> Thanks for the response!
>
>
> You mean move the ImageTool.groovy from:
>
> .../plugins/image-tools-1.0/src/groovy/ImageTool.groovy
>
> to:
>
> .../plugins/image-tools-1.0/src/groovy/imagetool/ImageTool.groovy
>
> and add:
>
> package imagetool
>
> to the ImageTool.groovy?
>
>
> Because that's not working.
>
> ( I also added 'import imagetool.ImageTool' to my Image.groovy domain class
> )
>
> I end up with:
>
>   [groovyc] Compiling 2 source files
> to /home/corey/.grails/1.0.3/projects/MyApp/classes
> Compilation error:
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
> failed, /home/corey/MyApp/grails-app/domain/my/package/Image.groovy: 23:
> unable to resolve class imagetool.ImageTool
>  @ line 3, column 1.
>    import imagetool.ImageTool
>

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: ImageTool plugin

Ricardo J. Méndez
Oops, sorry, missed this message when you first sent it. Glad everything is working now.

On Fri, Jul 4, 2008 at 5:52 PM, Corey <[hidden email]> wrote:
On Friday 04 July 2008 04:47:48 pm Corey wrote:
> On Friday 04 July 2008 05:02:15 pm Burt Beckwith wrote:
> > ImageTool is in the default package, so you cannot reference it from a
> > package. You can just move the class to a subdirectory and change its
> > package accordingly.
>


Ok, I had to run a 'grails clean' after I modified the plugin as you
suggested.

All is working - thanks!





> Thanks for the response!
>
>
> You mean move the ImageTool.groovy from:
>
> .../plugins/image-tools-1.0/src/groovy/ImageTool.groovy
>
> to:
>
> .../plugins/image-tools-1.0/src/groovy/imagetool/ImageTool.groovy
>
> and add:
>
> package imagetool
>
> to the ImageTool.groovy?
>
>
> Because that's not working.
>
> ( I also added 'import imagetool.ImageTool' to my Image.groovy domain class
> )
>
> I end up with:
>
>   [groovyc] Compiling 2 source files
> to /home/corey/.grails/1.0.3/projects/MyApp/classes
> Compilation error:
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
> failed, /home/corey/MyApp/grails-app/domain/my/package/Image.groovy: 23:
> unable to resolve class imagetool.ImageTool
>  @ line 3, column 1.
>    import imagetool.ImageTool
>

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

   http://xircles.codehaus.org/manage_email





--
Ricardo J. Méndez
http://ricardo.strangevistas.net/
Loading...