On Mar 7, 2:01 pm, Mike Tardif <[EMAIL PROTECTED]> wrote:
> Consider
> class MyObject extends ScriptableObject {
> ...
> public Object get(String name, Scriptable start) {
> Object obj = super.get(name, start);
> if (obj != Scriptable.NOT_FOUND)
> return obj;
> if (obj == UniqueTag.NOT_FOUND) {
> if (name.equals("Function")) // <--- why I'm
> getting called
> back for "Function"
> return obj;
> }
> // get my MyObject's properties.
> ...
> }
> ...
> }
> Getting Scriptable.NOT_FOUND from super.get(name, start) is well
> documented and understood.
>
> Getting UniqueTag.NOT_FOUND is not documented and not understood.
> What else besides "Function" am I likely to see in the get()
> callback? Or I have missed defining something else?
>
> Cheers,
In Scriptable.java:
public static final Object NOT_FOUND = UniqueTag.NOT_FOUND;
So Scriptable.NOT found should be identical to UniqueTag.NOT_FOUND.
Just use Scriptable.NOT_FOUND in your code.
--N
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino