Charles Oliver Nutter wrote:
> Paul Fraser wrote:
>> Hi All,
>>
>> Trying to convert a Scene Graph demo "Nodes" to JRuby.
>>
https://scenegraph-demos.dev.java.net/demos.html>> This line:
>> Composer.register(AffineTransform.class, TransformComposer.class)
>> gives this error:
>> C:/Users/paulAdmin/Documents/NetbeansProjects/scene_graph_work/lib/scene_graph.rb:1:
>> expected [java.lang.Class, java.lang.Class]; got:
>> [org.jruby.RubyClass,org.jruby.RubyClass]; error: argument type
>> mismatch (TypeError)
>>
>> I am probably out of my depth here, but are the experts able to help?
>> How do I "cast" an "org.jruby.RubyClass" to a "java.lang.Class" or
>> what procedure should be used in this case?
>
> If AffineTransform is a Java class, you want to call .java_class to
> get it out. I know, it's gross. I'm hoping to improve that post 1.1.4.
>
> - Charlie
Charlie,
Both of these fail:
Composer.register(AffineTransform.class.java_class,
TransformComposer.class.java_class)
error:
C:/Users/paulAdmin/Documents/NetbeansProjects/scene_graph_work/lib/scene_graph.rb:79:
undefined method `java_class' for Class:Class (NoMethodError)
Composer.register(AffineTransform.java_class,
TransformComposer.java_class)
error runtime:
com/sun/scenario/animation/Composer.java:162:in `register':
java.lang.IllegalArgumentException: Problem constructing appropriate
Composer for type class java.awt.geom.AffineTransform: (NativeException)
What form should the call take?
Thanks
Paul Fraser
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email