On Wed, Mar 3, 2010 at 7:36 PM, Brian McDevitt
<brian.p.mcdev...@gmail.com> wrote:
> I went with the Jacob-based solution because it seems like the easiest route
> and the Jacob project is quite mature.  I suspect that once the
> method_missing
> is working for the Win32OLE class 90% of the integration is done.  At that
> point
> we're just passing everything to the Jacob library and returning objects
> (and
> exceptions where appropriate).

That's great progress! It's certainly more done than any theoretical
FFI version, so if it's close we could probably include it in JRuby in
the near term (or direct people to install it as a gem).

> That being said, I still haven't been able to get 'method_missing' to work.
> If anyone
> knows how to do this, let me know.
>
> Charlie - I took your advice about removing 'meta = true' from the
> annotation, but still no
> dice.

Here's a sample JRuby class that defines method_missing and works
fine...hopefully this will help you.

http://github.com/jruby/jruby/blob/master/src/org/jruby/demo/ext/MethodMissing.java

And example usage (just to show it's working...I assume you already
know how to get extensions to init properly):

➔ jruby -d -rjruby -rjava -e
"org.jruby.demo.ext.MethodMissing.init(JRuby.runtime); mm =
MethodMissing.new; mm.foo; mm.bar 'a', 1, 2.0"
foo
bar
a
1
2.0

- Charlie

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

    http://xircles.codehaus.org/manage_email


Reply via email to