And all of this begs the question:

Why is my customer importing an interface into a typeless language?

Sigh...

It would appear that calling removeObject("Iterator") on every scope as its
created works, but later setting Iterator=null "unfixes" it.  Quite Strange.

So Anyway, my fix goes something like this:

    if (m_context.getLanguageVersion() < Context.VERSION_1_7) {
      m_scope.delete( "Iterator" );
    }


One could build a list of newly exposed objects/types by version and
externally "correct" rhino's behavior, but it would be nice if Rhino took
care of it on its own.  Sounds like I need to make a bug report.

It'd also be nice to be able to expose a class under a name other than the
default.  JString instead of String (importClass(java.lang.String) throws an
identical error btw).

--Mark Storer
  Senior Software Engineer
  Autonomy Cardiff

import legalese.Disclaimer;
Disclaimer<Cardiff> discard = new Disclaimer<Cardiff>();
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to