Subj : Re: Spidermonkey:JS_DefinePropertyWithTinyId() on array object sets array length! To : netscape.public.mozilla.jseng From : Steve Evans Date : Mon Sep 19 2005 10:24 am "Brendan Eich" wrote in message news:43286ECF.7040707 meer.net... > Why do you use JS_DefinePropertyWithTinyId, btw? Just asking, there is > one good reason that I know of (to define several to many tinyid-based > properties that share the same getter and possibly setter). > I'm not sure why the code uses tinyIds! (I'm not the original author.) It doesn't seem to use them when looking up the properties, which is done by name. > The workaround, which you may be able to use forthwith, is to use > negative tinyids. That's traditional anyway, to avoid ambiguity with > array indexes in a shared class-wide getter or setter (which otherwise > would not be able to distinguish a[0] from a.tinyid0). > And it works perfectly, despite being the Star Trek solution. ("Have you tried reversing the polarity? It's a long shot, but it might just work...".) Many thanks! Steve .