jrubyfx-fxmlloader 0.4-java → 0.4.1-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6dba6126b3ed56424fa13ae880b4f8dda4aed7a5
4
- data.tar.gz: 21a8be844a4f3d22b1c22462542d01330a856431
3
+ metadata.gz: f0deb7aeb1091b999e9983a95b9fe3d184034068
4
+ data.tar.gz: 1e4d685cb8e9d8f37ee3215aa85fda49cd961c0d
5
5
  SHA512:
6
- metadata.gz: c1d0ed616f268fb7727a8bc29d21113d4dd003d86e321f10bda791506baee80d0f0568714418ccc876525866674fc08bfa8562ce96ff215356f1133cd0c10ea1
7
- data.tar.gz: fa25ff79a1f5311cfa094d900ba057ca3607f7aaa62f03d4c68cadb29662e3e6a261b3ce96a3fbaa1efd627b5147c4a57b9071e26b3478afe14985ddc7091266
6
+ metadata.gz: 2224f8aa62ab203070bab2e3944f2ecda4122c3d62521b8bc939bad5bbe4b7e243afa5bb26e0bca84fe28b146ada10b4b7bf413406487ed8f4d9e4dd813442ad
7
+ data.tar.gz: 07a02729732870ee2d0c85dcf928d6456223cb0cee209cf06149b664621ec781e61df482297d4a2132f459745560a262ec0dcf15214081aba02b047dad617581
data/Rakefile CHANGED
@@ -45,7 +45,7 @@ task :gem => :jar
45
45
 
46
46
  spec = Gem::Specification.new do |s|
47
47
  s.name = 'jrubyfx-fxmlloader'
48
- s.version = '0.4'
48
+ s.version = '0.4.1'
49
49
  s.platform = 'java'
50
50
  s.has_rdoc = true
51
51
  s.extra_rdoc_files = ['README', 'LICENSE']
Binary file
@@ -539,7 +539,10 @@ class ScriptEventHandler
539
539
  def handle(event)
540
540
  # Don't pollute the page namespace with values defined in the script
541
541
  engineBindings = @scriptEngine.getBindings(ScriptContext::ENGINE_SCOPE);
542
- localBindings = @scriptEngine.createBindings();
542
+ #localBindings = @scriptEngine.createBindings(); # TODO: this causes errors with nashorn in jdk8 by creating a different kind of
543
+ # script object that doesn't respect the magic nashorn.global object
544
+ localBindings = Java::JavaxScript::SimpleBindings.new
545
+ localBindings.put_all(engineBindings)
543
546
  localBindings.put(FXL::EVENT_KEY, event);
544
547
  @scriptEngine.setBindings(localBindings, ScriptContext::ENGINE_SCOPE);
545
548
 
@@ -36,7 +36,7 @@ end
36
36
  java_import 'javafx.fxml.JavaFXBuilderFactory'
37
37
  java_import 'java.lang.InstantiationException', 'java.lang.IllegalAccessException'
38
38
 
39
- java_import *%w[com.sun.javafx.Logging
39
+ java_import *%w[
40
40
  java.io.IOException
41
41
  java.io.InputStream
42
42
  java.io.InputStreamReader
@@ -219,7 +219,7 @@ class SecretHashCompararator
219
219
  end
220
220
 
221
221
  class FxmlBuilderBuilder # the builder builder (builds builders)
222
- @@bf = Java::javafx.fxml.JavaFXBuilderFactory.new
222
+ @@bf = Java::javafx.fxml.JavaFXBuilderFactory.new(JRuby.runtime.jruby_class_loader)
223
223
  def self.new(arg_map, builder_type)
224
224
  builder = @@bf.getBuilder(builder_type)
225
225
  arg_map.each do |k, v|
@@ -265,7 +265,7 @@ class FxmlLoader
265
265
  @@fxml_jit_info = {}
266
266
  def initialize(url=nil, ctrlr=nil, resourcs=nil, buildFactory=nil, charset=nil, loaders=nil)
267
267
  @location = url
268
- @builderFactory = buildFactory || JavaFXBuilderFactory.new
268
+ @builderFactory = buildFactory || JavaFXBuilderFactory.new(JRuby.runtime.jruby_class_loader)
269
269
  @template = false
270
270
  @namespace = FXCollections.observableHashMap()
271
271
  self.controller = ctrlr
@@ -666,13 +666,13 @@ class FxmlLoader
666
666
  def loadTypeForPackage(packageName, className=nil)
667
667
  packageName = (packageName + "." + className.gsub('.', '$')) if className
668
668
  begin
669
- return Java.java.lang.Class::forName(packageName, true, FXL::default_class_loader);
670
- rescue ClassNotFoundException => ex
669
+ return JavaUtilities.get_proxy_class(packageName).java_class.to_java
670
+ rescue NameError => ex
671
671
  # probably ruby class
672
672
  begin
673
673
  return packageName.constantize_by(".")
674
674
  rescue
675
- raise ex # nope, not our issue anymore
675
+ raise ClassNotFoundException.new(packageName) # nope, not our issue anymore
676
676
  end
677
677
  end
678
678
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jrubyfx-fxmlloader
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.4'
4
+ version: 0.4.1
5
5
  platform: java
6
6
  authors:
7
7
  - Patrick Plenefisch & JRubyFX team & Oracle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-05 00:00:00.000000000 Z
11
+ date: 2016-01-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: JRubyFX FxmlLoader gem bits
14
14
  email: simonpatp@gmail.com
@@ -25,11 +25,11 @@ files:
25
25
  - lib/jrubyfx-fxmlloader.rb
26
26
  - lib/fxmlloader/elts.rb
27
27
  - lib/fxmlloader/fxml_jit_info.rb
28
+ - lib/fxmlloader/rrba.rb
28
29
  - lib/fxmlloader/j8_expression_value.rb
30
+ - lib/fxmlloader/value_elts.rb
29
31
  - lib/fxmlloader/real_elts.rb
30
32
  - lib/fxmlloader/rorba.rb
31
- - lib/fxmlloader/rrba.rb
32
- - lib/fxmlloader/value_elts.rb
33
33
  homepage: https://github.com/byteit101/JRubyFX-FXMLLoader
34
34
  licenses:
35
35
  - GPL-2.0-with-classpath-exception