Subj : Anonymous classes in Rhino To : netscape.public.mozilla.jseng From : mprentice@datadesk.com (Michael Prentice) Date : Wed Feb 19 2003 02:06 pm I'm having some trouble figuring out how to create my anonymous class in Rhino. I read the instructions for implementing a Runnable object and they work. I have an interface, PropertiesFilter, with a single method: public boolean accept(String key, String value); I try to implement it with the following lines: importPackage(Packages.com.datadesk.util); f = new PropertiesFilter({ accept: function(k, v) { return k.startsWith("extensions.modules.calc"); }}); Console.putln(f.accept("me", "my")); When I run this quick test script I get the following exception: TypeError: undefined is not a function. at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:582) .... and a long stack trace Any help is greatly appreciated. Thanks! -- Mike Prentice .