Subj : Calling Context.exit without previous Context.enter exception To : netscape.public.mozilla.jseng From : =?iso-8859-9?Q?Fatih_S=F6kmen?= Date : Fri Mar 25 2005 11:23 am This is a multi-part message in MIME format. ------=_NextPart_000_0009_01C5312D.236702D0 Content-Type: text/plain; charset="iso-8859-9" Content-Transfer-Encoding: quoted-printable Hi everyone, I am designing a swing frame and testing how rhino works. In frame constructor, I do following issues=20 this.context =3D Context.enter(); this.scope1 =3D context.initStandardObjects(null); this.scope2 =3D context.initStandardObjects(null); this.scope3 =3D context.initStandardObjects(null); Whenever I pressed an exit button on frame I call Context.exit() But following exception occures. =20 java.lang.IllegalStateException: Calling Context.exit without previous = Context.enter Do I always need to construct a try-finally block. try { Context.enter scoper.evaluateScript(); } finally { Context.enter(); } Can anyone help me ? Where is my fault ? ------=_NextPart_000_0009_01C5312D.236702D0 Content-Type: text/html; charset="iso-8859-9" Content-Transfer-Encoding: quoted-printable
Hi everyone,
I am designing a swing frame and = testing how rhino=20 works.
 
In frame constructor, I do following issues 

  this.context =3D=20 Context.enter();
  this.scope1  =3D=20 context.initStandardObjects(null);
  this.scope2  = =3D=20 context.initStandardObjects(null);
  this.scope3  = =3D=20 context.initStandardObjects(null);
Whenever I pressed an exit button on frame I call
     Context.exit()
 
But following exception occures.
 

java.lang.IllegalStateException: Calling Context.exit without = previous=20 Context.enter

Do I always need to construct a try-finally block.
 
 try {
   Context.enter
   scoper.evaluateScript();
 } finally {
   Context.enter();
}
 
Can anyone help me ? Where is my fault ?
------=_NextPart_000_0009_01C5312D.236702D0-- .