Subj : Re: Big problem, please help... To : Cunac From : Brendan Eich Date : Thu Nov 13 2003 10:54 am Cunac wrote: >Maybe I am doing somethnig wrong, but I just can not make it work: > >1. I create new object 'b' in existing object 'a' via JS_DefineObject. >2. Inside object 'b' I compile and execute statement: > >V='test'; > > Let me guess: you're working on a VXML embedding? >via functions JS_CompileUCScript and JS_ExecuteScript > >3. Evaluation of variable V in object 'b' returns 'test' - expected (ok). >4. Evaluation of variable b.V inside object 'a' returns 'undefined' - >unexpected > >Why? > >If instead of expression "V='test'" I execute expression: > >var V='test'; > >in step 2, then 4. point wors o.k. (evaluate to 'test'). > >Is this a bug or I am doing something wrong? > > Are you using JSOPTION_VAROBJFIX? See jsapi.h. Are you making a the parent of b? I'm guessing you are, but please confirm. I shouldn't guess so much ("*I never guess: it is an appalling habit, destructive to the logical faculty." - S. Holmes).* /be .