On Mar 3, 1:09 pm, "Ruland Kevin-BHP637" <[EMAIL PROTECTED]> wrote: > I recall that thread and thought by the last comment by Norris, that the > previous behavior was restored. Alas, I should have written more test cases > before committing to 1.7. > > I think my problem is slightly different in that my getIds() was not > returning "identifiers" but rather values. That is the array contained > neither Strings nor Numbers but rather other ScriptableObjects. It seemed > that your problem was your object implemented the Java Iterable interface and > the ScriptableRuntime.enumInit method decided not to call getIds(). (I > haven't checked the cvs log to verify this). > > My fix will probably to remove my creative abuse of the getIds() method and > instead implement __iterator__ property. > > Kevin > > ________________________________ > > From: Attila Szegedi [mailto:[EMAIL PROTECTED] > Sent: Mon 3/3/2008 11:47 AM > To: Ruland Kevin-BHP637 > Cc: [EMAIL PROTECTED] > Subject: Re: How does iterable work in 1.7? > > Actually, I raised this myself about two months ago: > > <http://groups.google.com/group/mozilla.dev.tech.js-engine.rhino/brows... > > > > Nothing has been done about it yet. That's actually quite a serious > problem for me, but just as you, I'd be willing to adapt if I knew how > -- we'd need more input from whoever wrote the new Iterable support > (either Norris or someone he committed the code on behalf of). > > Attila. > > On 2008.03.03., at 18:13, Ruland Kevin-BHP637 wrote: > > > Hi all, > > > Some of my custom ScriptableObject implementations have broken > > between 1.6 and 1.7. I had been abusing getIds() to return non- > > String, non-Number objects (basically value references) to implement > > crude 'for each' value-iteration semantics. What I had done is now > > completely broken when using 1.7 because ScriptRuntime.enumNext now > > does a blind cast to Number. > > > I am willing to change my code to make this work correctly, but I'd > > like some idea about what I need to do. Is there any documentation > > on the implementation of iteration in 1.7? > > > Thanks > > > Kevin
Where does Rhino do its blind cast to Number that causes you problems? --N _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
