pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacques Granduel <jgrand...@gmail.com>
Subject Re: launching Pivot programmatically
Date Sun, 21 Nov 2010 21:34:33 GMT

2010/11/21 Greg Brown <gkbrown@mac.com>

> Is the test.bxml on your classpath? I'm not sure how the classpath is
> managed in Rhino, so I don't have any specific suggestions.
> I am curious to know why you want to launch your app via the Rhino shell,
> though. Any reason you can't simply launch it via
> DesktopApplicationContext#main()?

thank you for your reply.

At last, I checked ScriptApplication source,

I changed the URL object to be created from a path...
URL location = classLoader.getResource(src.substring(1));
String path = properties.get(SRC_KEY);
URL location = new File(src).toURI().toURL();

and that was it! I can now see my first Pivot Hello world!!

So my reasons for doing that kind of stuff, well, er, curiosity? learning
and playing Pivot from a tiny environment, manipulating the bxml xml with
E4X and dynamically injecting js code in the GUI ?... I have to learn how to
directly pass a bxml String or E4X/XML object to ScriptApplication and to
manipulate objects from the rhino shell, as it's doable in Swing.

Thanks again,

View raw message