On 20 February 2010 23:22, James Paige <[email protected]> wrote: > On Sat, Feb 20, 2010 at 05:35:29PM +1300, Ralph Versteegen wrote: >> On 20 February 2010 10:30, <[email protected]> wrote: >> > james >> > 2010-02-19 13:30:52 -0800 (Fri, 19 Feb 2010) >> > 91 >> > Add "same slice" identity test, since (handle1 == handle2) can fail >> > under some conditions. >> > --- >> > U wip/docs/plotdict.xml >> > U wip/docs/plotdictionary.html >> > U wip/plotscr.hsd >> > U wip/whatsnew.txt >> > U wip/yetmore.bas >> >> Which conditions are those? We effectively intern slice handles, so I >> would have thought that would be impossible. > > Actually, I am not sure... Thinking about it more, perhaps a "same > slice" identity test isn't really needed. Maybe there is just a bug in > one of the commands which is causing duplicate handles to the same > slice. > > I have a variable named "player" which gets assigned in a "create > player" script. The player slice may be reparented and resorted, and its > siblings both before and after may be added or removed. At various > points I loop though all children of a "sprites" slice, running > functions on each slice, and sometimes they do special case handling > when sl == player or when sl <> player > > I noticed that sl == player was never returning true. Apparently the > previously set "player" variable was still valid, and I could manipulate > the slice with it, but when looping through the slices with "next > sibling" I would get a different handle number for the same slice. > > --- > James
Yes, that's definitely a bug, and same slice should be removed. I think I found the bug, in create_plotslice_handle. Try now. _______________________________________________ Ohrrpgce mailing list [email protected] http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
