Sorry about the late reply. I was trying my hand at some linux installation and I had... troubles. Finally got it to work though.
Anyway this can probably be cleaned up (a lot). To use it as is though you need to do the following.
-The setupRelation() method only needs to be implimented once in the first object, and needs to be called once for the first created object of a type. This is just so the list knows what is a parent of what.
-The init method could be replaced by a new method... i can't remember why i didn't do that in the 1st place.
-The ForList function could be implemented once I think.
Both of the following could probably be implemented as global mapping of some kind so not every object would be carrying the same information.
-p_Type is the id of the parent object should be set in the new method
-o_Index is used internally by the list
It's late right now so in the morning I'll rework it and see what I can to to make it more userfriendly and efficient.
Anyway this can probably be cleaned up (a lot). To use it as is though you need to do the following.
-The setupRelation() method only needs to be implimented once in the first object, and needs to be called once for the first created object of a type. This is just so the list knows what is a parent of what.
-The init method could be replaced by a new method... i can't remember why i didn't do that in the 1st place.
-The ForList function could be implemented once I think.
Both of the following could probably be implemented as global mapping of some kind so not every object would be carrying the same information.
-p_Type is the id of the parent object should be set in the new method
-o_Index is used internally by the list
It's late right now so in the morning I'll rework it and see what I can to to make it more userfriendly and efficient.