Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown property type error after loading 1.0 #50

Closed
amiracam opened this issue Jun 3, 2013 · 4 comments
Closed

Unknown property type error after loading 1.0 #50

amiracam opened this issue Jun 3, 2013 · 4 comments

Comments

@amiracam
Copy link

amiracam commented Jun 3, 2013

Trying to get past my last bug reported. I loaded jrubyfx 1.0 and now I'm getting unknown property type errors where I wasn't getting them before. The class below TbEntity was successfully used as collection type for a list within a tableview.

Apparently , the error is in the method <fxml_accessor> here:

ptype.java_class.java_instance_methods.find_all{|x|x.name == "getValue"}

i.e. the above returns an empty array.

Again, I was successfully making those calls based on prior git repo source code.

The code says to manually supply a which I didn't have to before. By do we mean Ruby type i.e. in this case a String ?

Stack:

RuntimeError: Unknown property type. Please manually supply a type or report this as a bug
fxml_accessor at /Users/charles/.rvm/gems/jruby-1.7.4/gems/jrubyfx-1.0.0-java/lib/jrubyfx/module.rb:135
TbEntity at /Users/charles/RubymineProjects/TbHolidayMaintenance/src/lib/tb_entity.rb:9
(root) at /Users/charles/RubymineProjects/TbHolidayMaintenance/src/lib/tb_entity.rb:4
require at org/jruby/RubyKernel.java:1054
(root) at file:/Users/charles/.rvm/rubies/jruby-1.7.4/lib/jruby.jar!/jruby/kernel19/kernel.rb:1
require_relative at file:/Users/charles/.rvm/rubies/jruby-1.7.4/lib/jruby.jar!/jruby/kernel19/kernel.rb:21
require at org/jruby/RubyKernel.java:1054
(root) at /Users/charles/RubymineProjects/TbHolidayMaintenance/src/lib/holiday_maintenance_controller.rb:5
(root) at file:/Users/charles/.rvm/rubies/jruby-1.7.4/lib/jruby.jar!/jruby/kernel19/kernel.rb:1
load at org/jruby/RubyKernel.java:1073
(root) at -e:1

Process finished with exit code 1

class TbEntity

include JRubyFX

fxml_accessor :processed_date, java.lang.String
fxml_accessor :entity_type, java.lang.String
fxml_accessor :entity_name, java.lang.String

def initialize date, type , name

converted_date = (DateTime.parse date).strftime('%m/%d/%y')
@processed_date = SimpleStringProperty.new converted_date
@entity_type = SimpleStringProperty.new type
@entity_name = SimpleStringProperty.new name

end
end

TbEntity.become_java!

@byteit101
Copy link
Member

fxml_accessor takes a Property type like SimpleStringProperty instead of normal types like String.

@amiracam
Copy link
Author

amiracam commented Jun 3, 2013

ok, changed my code to this new scheme, however I"m still getting errors
which prevent the app from opening which I was not getting before, here's
the stack:

Here's the stack:

Exception running Application:
#<TypeError: can't convert nil into String>
org/jruby/RubyFile.java:1840:in join' org/jruby/RubyFile.java:801:injoin'
/Users/charles/.rvm/gems/jruby-1.7.4/gems/jrubyfx-1.0.0-java/lib/jrubyfx/controller.rb:301:in
get_fxml_loader' /Users/charles/.rvm/gems/jruby-1.7.4/gems/jrubyfx-1.0.0-java/lib/jrubyfx/controller.rb:99:in load_into'
/Users/charles/RubymineProjects/TbHolidayMaintenance/src/lib/holiday_maintenance_view.rb:14:in
start' /Users/charles/.rvm/gems/jruby-1.7.4/gems/jrubyfx-1.0.0-java/lib/jrubyfx/java_fx_impl.rb:120:in launch_app_after_platform'
org/jruby/gen/InterfaceImpl564867642.gen:13:in `run'

Process finished with exit code 0

On Mon, Jun 3, 2013 at 11:44 AM, Patrick Plenefisch <
notifications@github.com> wrote:

fxml_accessor takes a Property type like SimpleStringProperty instead of
normal types like String.


Reply to this email directly or view it on GitHubhttps://github.com//issues/50#issuecomment-18850281
.

Charles A. Monteiro
www.monteirosfusion.com
sent from the road

@amiracam
Copy link
Author

amiracam commented Jun 3, 2013

ok, apparently the fxml_root setting has also changed

On Mon, Jun 3, 2013 at 12:39 PM, Charles Monteiro
charles@nycsmalltalk.orgwrote:

ok, changed my code to this new scheme, however I"m still getting errors
which prevent the app from opening which I was not getting before, here's
the stack:

Here's the stack:

Exception running Application:
#<TypeError: can't convert nil into String>
org/jruby/RubyFile.java:1840:in join' org/jruby/RubyFile.java:801:injoin'
/Users/charles/.rvm/gems/jruby-1.7.4/gems/jrubyfx-1.0.0-java/lib/jrubyfx/controller.rb:301:in
get_fxml_loader' /Users/charles/.rvm/gems/jruby-1.7.4/gems/jrubyfx-1.0.0-java/lib/jrubyfx/controller.rb:99:in load_into'
/Users/charles/RubymineProjects/TbHolidayMaintenance/src/lib/holiday_maintenance_view.rb:14:in
start' /Users/charles/.rvm/gems/jruby-1.7.4/gems/jrubyfx-1.0.0-java/lib/jrubyfx/java_fx_impl.rb:120:in launch_app_after_platform'
org/jruby/gen/InterfaceImpl564867642.gen:13:in `run'

Process finished with exit code 0

On Mon, Jun 3, 2013 at 11:44 AM, Patrick Plenefisch <
notifications@github.com> wrote:

fxml_accessor takes a Property type like SimpleStringProperty instead of
normal types like String.


Reply to this email directly or view it on GitHubhttps://github.com//issues/50#issuecomment-18850281
.

Charles A. Monteiro
www.monteirosfusion.com
sent from the road

Charles A. Monteiro
www.monteirosfusion.com
sent from the road

@amiracam
Copy link
Author

amiracam commented Jun 3, 2013

all good now 1.0 made certain key changes to the set up of an app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants