On Mar 24, 2:24 pm, Martin Honnen <[email protected]> wrote: > [email protected] wrote: > > When I try to run this I get an error that tells me that person does > > not have an "activated" property. I would like to be able to > > dynamically add properties to a Java object from within JavaScript Is > > this possible? Is there a configuration item I could set to make this > > happen? Or is there a particular design idiom I will need to apply to > > get this to work? > > You need to implement a host object, > seehttp://www.mozilla.org/rhino/tutorial.html#definingHostObjects > and seehttp://mxr.mozilla.org/mozilla/source/js/rhino/examples/Counter.java > for an example. > > What you are currently doing is using Java objects in JavaScript via > LiveConnect. > > -- > > Martin Honnen > http://JavaScript.FAQTs.com/
Thanks! I found this helpful. I am not sure what you recommended will help by particular issue, but your confirmation that the behavior I was seeing is by design was helpful. I decided to continue wrapping the object on the JavaScript side, and programatically extending that object at runtime. Regards, Bediako _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
