Get the next node in a TMap?

BlitzMax Forums/BlitzMax Programming/Get the next node in a TMap?

JoshK(Posted 2007) [#1]
I'm dealing with animation. I have an arbitrary number of keyframes in a TMap, ordered by frame time:

key1 frame=1
key2 frame=2
key3 frame=5
key4 frame=9
key5 frame=23

I want to find the closest keys to any arbitrary frame time. So for frame time "7" I would want to find key 3 and 4. I can first check to see if there is a value for a frame 7 in the TMap, and just use that. If it isn't found, I can create a temporary key with frame=7 and insert it, and retrieve its higher and lower neighbor.

How would I retrieve its neighbors? All the good parts of TMap are Private.

--EDIT--

Ah, I figured it out. All the underscored scary functions do this. I got it working with arbitrary animation frames!