Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Enriching an object in script = object disposed exception?

0
0
Hi,

Probably doing something stupid, but in my host app I have an object, which I pass into the script engine. The script then adds some new properties to it (it's a dynamic), then the engine is disposed and my host object contains these new properties.

However, in my script, if I add a new property to the object like this;
theObject.someNewProperty = {
     innerProperty1 = 10,
     innerProperty2 = "Hello world"
};
If I then access theObject.someNewProperty within my host, after the engine has disposed, I get an ObjectDisposedException.

Any thoughts / assistance appreciated.

Cheers
Tony

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images