Comments (12)
@Hobogrammer do you have a small app that I can use to reproduce this?
from jrubyfx.
@byteit101 This was the code I was using in my tiny app before the work around. https://github.com/Hobogrammer/Tadoku-Character-Counter/tree/b8ff291cb4d16c0d88586f8f62856d06a3a7b127
from jrubyfx.
I don't even see the .addChangeListener in official JavaFX docs. Where is this method coming from?
http://docs.oracle.com/javafx/2/api/javafx/beans/property/SimpleStringProperty.html
from jrubyfx.
oh duh, its a jrubyfx method with the same name as a javafx 1 method which makes it hard to google
from jrubyfx.
Yeah, the actual javafx 2.0 method is just addListener
, but in our dsl its add_change_listener
:
https://github.com/jruby/jrubyfx/blob/master/lib/jrubyfx/core_ext/observable_value.rb#L28
from jrubyfx.
For current users of jrubyfx I think things are still in enough flux where we can just change the API to match current JavaFX, but does JRubyFX even work with older JavaFX? (sorry for the aside in this report :) )
from jrubyfx.
I don't think so, its something completely different. I just found it confusing until I realized what was going on that we (@enebo actually) called it add_change_listener to wrap addListener, and javafx 1 had addChangeListener
from jrubyfx.
Perhaps there was an overload issue? I don't know why I would have added that name without following what I thought was FX naming. Hmmm I bet this was some mongo commit where I explained nothing too...
from jrubyfx.
anyway, the interesting issue is why does jarification make this fail? its just a simple wrapper
from jrubyfx.
This is typically the execution environment which causes these issues. If we extend a class we cannot really extend it in the Java sense since we are not actually constructing a Java class at runtime which extends the signatures. This in turn means to access protected methods (or package) we end up using setAccessible to make those methods execute in spite of being called from a non-extending (or non-package) Java object (our Ruby wrapped one). This is just speculation.
@Hobogrammer Can you describe the way in which you execute the jar and how you created it?
from jrubyfx.
Sorry about the delay.
simply used jrubyfx-jarify /projects/JavaFX/Tadoku-Character-Counter/src --main /projects/JavaFX/Tadoku-Character-Counter/src/charcount.rb TCC.jar
to build the jar and java -jar TCC.jar
to run it.
from jrubyfx.
I think this is actually a bug in JRuby as I was modifying this stuff, and the following happened:
- direct calling add_listener works but gives off warning
- using java_send throws odd access permission
- using java_method calls wrong method but no errors
from jrubyfx.
Related Issues (20)
- jrubyfx sensitive to number of spaces in fxml HOT 2
- Enhancement: Provide Ruby binding impls HOT 1
- Setting TableView items doesn't seem to work HOT 4
- Jar classpath issue on windows HOT 1
- jarify with fxml: no .jrubyfx_cache in the jarfile HOT 1
- jarify with fxml: cannot access the fxml files
- jarify with fxml: require_relative doesn't work from inside a jarfile
- jrubfx-jarify compiled jar does not laucnch HOT 5
- cannot run the hello world app HOT 2
- gem install jrubyfx gem not found HOT 1
- Permission denied for 'jrubyfx_cache' HOT 2
- Need more documentation for controller functions HOT 1
- jrubyfx não encaminhando HOT 2
- Is this project active ? HOT 3
- Path to jfxrt.jar loading issue with 1.8.0_202-ea-b03 HOT 1
- Would it be possible to add a screenshot-example to the main README here? HOT 1
- Use javafx 17 modules HOT 3
- Warning: SCENE3D? HOT 1
- More examples perhaps? TextArea specifically
- Classic OOP style? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jrubyfx.