groovyfx-project / groovyfx

A library for writing JavaFX 8 applications in the Groovy language.
http://groovyfx.org
Apache License 2.0
199 stars 48 forks source link

TableView2Demo does not run, missing imports #60

Open rich-coe opened 5 years ago

rich-coe commented 5 years ago

Missing Person definition and imports to support Person

`org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: /usr/local/ext/src/github.com/groovyfx-project/groovyfx/src/demo/groovy/TableView2Demo.groovy: 27: unable to resolve class Person @ line 27, column 5. new Person(

[....] `

rich-coe commented 5 years ago

pull request #61 fixes this issue.

glockenstein commented 5 years ago

the fix for this bug is not okay, because Person and Gender are defined in TableViewDemo and now when I start any demo via gradle e.g. (gradle SwingDemo) I get a compilation error.

> Task :compileDemoGroovy FAILED
startup failed:
/extra/git/groovyfx/src/demo/groovy/TableViewDemo.groovy: 23: Invalid duplicate class definition of class Gender : The sources /extra/git/groovyfx/src/demo/groovy/TableViewDemo.groovy and /extra/git/groovyfx/src/demo/groovy/TableView2Demo.groovy each contain a class with the name Gender.
 @ line 23, column 1.
   enum Gender {
   ^
/extra/git/groovyfx/src/demo/groovy/TableViewDemo.groovy: 27: Invalid duplicate class definition of class Person : The sources /extra/git/groovyfx/src/demo/groovy/TableViewDemo.groovy and /extra/git/groovyfx/src/demo/groovy/TableView2Demo.groovy each contain a class with the name Person.
 @ line 27, column 1.
   @Canonical
   ^
2 errors
FAILURE: Build failed with an exception.