In fact I just discovered __elements is no longer iterated with ipairs but with next, and according to the Lua Reference Manual "the order in which the indices are enumerated is not specified, even for numeric indices". Even though I ran a couple of tests and the array values of tables persistently come up in ascending order. Haste himself uses this in oUF_lily:
table.insert(self.__elements, 2, PostCastStop)
Which again makes no sense for an undefined iteration. Does WoW redefine the next function to behave differently? Something is fishy here.
|