Subj : Missing the getProperty/setProperty mark with strings To : netscape.public.mozilla.jseng From : "Sterling Bates" Date : Sat Oct 25 2003 09:44 am I have a Delphi object that I want to be interactive with JS and other Delphi code simultaneously. Basically, a property set through JS should be immediately available through Delphi & vice versa. I've been able to have JS set the string property just fine, but returning a Delphi string property to javascript crashes the engine. I'm pretty sure this can be done, so I'm just wondering where my error lies. 1. Creating the object. I immediately assign a property to the associated JSObject called __addr which is the memory address of the Delphi class instance. This works fine, the JSClass property setter & getter use this, and then interact with the Delphi object. 2. Setting a property. My class setter gets the name & value of the variable to be set, then passes those on to the Delphi object. This works great using RTTI (reflection). 3. Getting a property. My class getter retrieves the name of the property to get, then passes that to the Delphi object. I create a new JSString (on the heap) containing the existing Delphi object's property value, and return that as a jsval to the class getter. If I GC and shut down the context & runtime before hitting step 3, everything is great. After step 3, the GC throws an access violation at address 6102BE7A. I know it's my allocation of the JSString, but I don't know how else to handle the get operation. I've tried looking at the spidermonkey code, but I can only glean a trace of what's going on there. Thanks for any help, Sterling .