. Is there some way to
take advantage of Rhino/JavaScript, ScriptableObject, etc. to achieve my
goal? It seems like this design problem would be pretty common to anyone
designing a JavaScript API for a Java application.
Thanks for the help.
--
Daryl Stultz
_
6
On Mon, May 18, 2009 at 11:12 AM, Daryl Stultz da...@6degrees.com wrote:
Hey all, I've had some basic JS extensions to my application in place for
some time now. It's time to get serious about building a proper API for my
application.
In the event that my first post was too verbose
to expose to JavaScript, this probably isn't the
project for you. Maybe you should look for a different JavaScript
interpreter.
--
Daryl Stultz
_
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:da...@6degrees.com
, return new data, etc.
--
Daryl Stultz
_
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:da...@6degrees.com
___
dev-tech-js-engine-rhino mailing list
dev-tech-js-engine-rhino@lists.mozilla.org
https
the e object ?
What does that mean? You printed the e object, didn't you?
what is the type of e object ?
JS objects don't really have a type in the was Java objects do. Again, what
is your goal?
--
Daryl Stultz
_
6 Degrees Software and Consulting, Inc
to JS e Object in
following js script.
But I don't understand this. Can you give more details of why you need it
and how you will use it once you get it.
--
Daryl Stultz
_
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:da
.
--
Daryl Stultz
_
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:da...@6degrees.com
___
dev-tech-js-engine-rhino mailing list
dev-tech-js-engine-rhino@lists.mozilla.org
https
On Tue, Dec 29, 2009 at 1:46 PM, Mark Storer mstorer3...@gmail.com wrote:
On Tue, Dec 29, 2009 at 5:29 AM, Daryl Stultz da...@6degrees.com wrote:
I do appreciate the annotations approach to writing host objects but it's
actually off topic from my original post.
I disagree. Observe
for a method/function though. Any ideas?
--
Daryl Stultz
_
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:da...@6degrees.com
___
dev-tech-js-engine-rhino mailing list
dev-tech-js-engine-rhino
On Tue, Dec 29, 2009 at 2:08 PM, Daryl Stultz da...@6degrees.com wrote:
That's similar to what I want to do. My host object would be generic with
no properties, just the inner POJO delegate. A call to get/put would cause
the host object to use reflection to access the appropriate getter/setter
On Wed, Dec 30, 2009 at 1:34 PM, Daryl Stultz da...@6degrees.com wrote:
domain.getChildren().add(new DomainEntity()); // fails because new object
is really a WrapperEntity (ok, it doesn't actually crash but it does add a
WrapperEntity to a List of DomainEntity.
I'm currently experimenting
believe I've found the solution to my problem.
I'll follow up on the other thread.
--
Daryl Stultz
_
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:da...@6degrees.com
___
dev-tech-js-engine-rhino
On Wed, Dec 30, 2009 at 1:34 PM, Daryl Stultz da...@6degrees.com wrote:
Is there any way to automatically unwrap the object being added to the
collection? Do I need to wrap all collections and implement add(), put(),
etc. in order to unwrap it as it's being added?
Between a WrapFactory
reference which scares me, I'm likely to produce a memory issue. I'm
wondering if it would help performance or if the reflection lookup work is
already being cached. IOW, is caching at the WrapFactory worth the
performance improvement, if any?
Thanks.
--
Daryl Stultz
know I won't be changing my code down the line in
that regard.
--
Daryl Stultz
_
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:da...@6degrees.com
___
dev-tech-js-engine-rhino mailing list
dev
burden to the GC to justify keeping
them around.
They're simply too light to cache.
My concern was not memory use but the expense of method lookups via
reflection. I imagine Rhino does a lot of caching of the lookups, then?
--
Daryl Stultz
_
6 Degrees Software
from never releasing that first scope from memory, which is
a minor, fixed size memory usage increase), it might actually work in your
scenario.
Thanks, Attila, this is good information I'll file away until I get the time
to address performance.
--
Daryl Stultz
On Mon, Jan 4, 2010 at 10:38 AM, Johan Compagner jcompag...@gmail.comwrote:
the thing is that JavaMembers could cache
Could it, should it, does it? Is this a feature/implementation request?
--
Daryl Stultz
_
6 Degrees Software and Consulting, Inc.
http
the problem is,
or how I can import classes into the top-level scope?
Thanks.
--Daryl Stultz
_
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:da...@6degrees.com
___
dev-tech-js-engine-rhino mailing
On Tue, Jan 19, 2010 at 4:05 PM, Daryl Stultz da...@6degrees.com wrote:
Hello,
I'm currently inserting text like this before compiling my script:
Bar = Packages. + foo.Bar.class.getName() + ;\n + theScriptToRun
as a way to alias the Bar class. I'd prefer not to do it this way
it in Rhino?
Well, this is how I use them, which may not be what you want since it puts
the values at the top level. Before running the script:
ScriptableObject.*putProperty*(scope, CLUBS, Context.*javaToJS*(Cardsuit.*
CLUBS*, scope));
--
Daryl Stultz
_
6 Degrees
?
http://www.mozilla.org/rhino/tutorial.html
About half way down. Not really documentation, but that's where I got it...
--
Daryl Stultz
_
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:da...@6degrees.com
* WrapFactory();
wrapFactory.setJavaPrimitiveWrap(*false*);
context.setWrapFactory(wrapFactory);
Sorry, I'm not sure if this will give you what you want or the opposite,
it's been a while...
--
Daryl Stultz
_
6 Degrees Software and Consulting, Inc.
http://www
. operator
I don't have any real help for you, but I'm reminded that the same error is
thrown (IIRC) on this:
myobject.delete()
I worked around it by renaming the function/method to remove(). Seems odd to
me that it chokes on this, but I don't know the ECMA spec much at all.
--
Daryl Stultz
a look at HttpClient.
--
Daryl Stultz
_
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:da...@6degrees.com
___
dev-tech-js-engine-rhino mailing list
dev-tech-js-engine-rhino@lists.mozilla.org
https
similar to Dan's however I'd like to replace it with
require. There's been some work done here to support the require()
function, I don't know much of the details, maybe someone else here can
cover it.
--
Daryl Stultz
_
6 Degrees Software and Consulting, Inc.
http
On Wed, May 26, 2010 at 5:59 PM, sk doyouunderst...@gmail.com wrote:
I keep getting: TypeError: [JavaPackage testpackage.Test] is not a
function, it is object.
Are you using a Class Shutter? I find I get this error for a class the
shutter doesn't permit.
--
Daryl Stultz
sure what to do, so thoughts appreciated.
Thanks.
--
Daryl Stultz
_
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
http://www.opentempo.com
mailto:daryl.stu...@opentempo.com
___
dev-tech-js-engine
On Mon, Nov 22, 2010 at 4:00 PM, Daryl Stultz daryl.stu...@opentempo.comwrote:
doesn't have any effect which makes sense since I created scope based on
this. Perhaps my problem is really, how to expose global functions to the
script. Can someone give me some examples of
using
On Mon, Nov 22, 2010 at 5:20 PM, Ian Stevens i.stev...@syncapse.com wrote:
On 2010-11-22, at 4:00 PM, Daryl Stultz wrote:
So you can continue what you're doing (ie., init your Scriptable with
functions to be accessed globally) but create scopes off your top-level
scope (this) using
30 matches
Mail list logo