[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ease-dev] Feature request: clipboard support (or instead loading arbitrary classes by name for DIY) (SOLVED)
|
Thanks; just realized that myself in another post that must have crossed
yours in the email. Looks like on can do amazing things with EASE! :-)
--Paul Fernhout
http://www.pdfernhout.net/
====
The biggest challenge of the 21st century is the irony of technologies
of abundance in the hands of those still thinking in terms of scarcity.
On 11/20/14 1:58 PM, Christian Pontesegger wrote:
On 20.11.2014 19:43, Paul D. Fernhout wrote:
[...] is there a way to import an arbitrary class into the JavaScript
Rhino environment from a name (in this case,
"org.eclipse.swt.dnd.Clipboard") so that I can access its fields or
use a constructor on a class?
Yes, just use the full qualified name, eg
var myString = new java.lang.String("foo");
Although, even if that worked, it seems like the next hurdle I might
run into is then creating an object array in EASE to pass into API calls.
See the Rhino FAQ:
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/FAQ
For your case
java.lang.reflect.Array.newInstance(java.lang.Object, 5);
works.
--
Christian
_______________________________________________
ease-dev mailing list
ease-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/ease-dev