Subj : Re: Anonymous classes in Rhino To : mprentice@datadesk.com From : Igor Bukanov Date : Thu Feb 20 2003 11:36 pm Which version of Rhino do you use? There is a regression in 1.5R4 compared with 1.5R3 in java scripting, see last comments for http://bugzilla.mozilla.org/show_bug.cgi?id=96270 , so if you use 1.5R4, could you try 1.5R3 ? Regards, Igor Michael Prentice wrote: > 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 .