Hey I went through everything that Fish went through, then I almost made a new topic myself (I now see there are already like 5 topics on this), but I managed to figure it out by looking through the TList code.
In the end I decided to use this After function, because links were way too much of a hassle and it was messy. I don't care about the speed difference that much because my lists are small.
This command should be built in and documented as a little slow in larger lists, right?
Right now it seems that everyone just creates a topic on blitzbasic.com when they can't find the after command.
In the end I decided to use this After function, because links were way too much of a hassle and it was messy. I don't care about the speed difference that much because my lists are small.
Function After:Object(List:TList,Element:Object) Local link:TLink link=list.findlink(element) If link=Null Then RuntimeError "Object not in list" link=link.nextlink() If link=Null Then Return Null Else Return link.value() EndIf EndFunction
This command should be built in and documented as a little slow in larger lists, right?
Right now it seems that everyone just creates a topic on blitzbasic.com when they can't find the after command.