« Return to Thread: Scene Graph Demo Convert to JRuby Problem

Re: Scene Graph Demo Convert to JRuby Problem

by Charles Oliver Nutter-2 :: Rate this Message:

Reply to Author | View in Thread

Paul Fraser wrote:

> 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:

AffineTransform.java_class

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: Scene Graph Demo Convert to JRuby Problem