I have an array of objects which uses a delimited string as the keys. When examined in the FB4 debugger, the keys look like this:
[+] 22477◦25220◦20.1 [+] 22477◦25220◦20.6 [+] 22477◦25220◦20.8 [+] 22477◦25244◦55.1K(j)
The first two items are numeric (cast to string) but the third item in the multi-part delimited key is naturally a string -- it's like an alphanumeric library shelf reference. As expected, when you click on the [+] icon in the debugger, you can view the object associated with that string key. So far so good.
The debugger shows the keys in the (pre-sorted) order in which they were added to the array. However, when iterating the object array so:
for (var key: String in MyAssociativeArray){ // keys are visited not in the order displayed by the debugger }
the keys are returned in some other order --internal hash? My question is, how does the debugger know the order the keys were added in, and can I access that knowledge at runtime when iterating the array? I want to iterate the objects in the order in which they were added. Or do I need to maintain my own index of these keys showing the order they were added to the associative array?
[0] 22477◦25220◦20.1 [1] 22477◦25220◦20.6 [2] 22477◦25220◦20.8 [3] 22477◦25244◦55.1K(j)
Thanks