A afields Member Licensed User Longtime User Oct 13, 2018 #1 Hello to all!. i'm creating a job that consist in a series of orders for printing. the job manager is very simple with only the delete option ( to delete one entry ) and the swap option ( to swap entry up or down). i had though to use a linked list and after searching i've tried to use the collectionExtra library which by the way is for android but i've also worked with it in b4j. however... when i debug i see what it seens to be 2 methods that are not public (but are usually used in linked list ). they are Next and Prev. So my question is: using the for each or for..next and inside get is the only method to read the list? what if beeing in a element i would need to go to the next element ( without using the index of the cycle?) shell i need to always know the item where i am? Thank to all!
Hello to all!. i'm creating a job that consist in a series of orders for printing. the job manager is very simple with only the delete option ( to delete one entry ) and the swap option ( to swap entry up or down). i had though to use a linked list and after searching i've tried to use the collectionExtra library which by the way is for android but i've also worked with it in b4j. however... when i debug i see what it seens to be 2 methods that are not public (but are usually used in linked list ). they are Next and Prev. So my question is: using the for each or for..next and inside get is the only method to read the list? what if beeing in a element i would need to go to the next element ( without using the index of the cycle?) shell i need to always know the item where i am? Thank to all!
Erel B4X founder Staff member Licensed User Longtime User Oct 14, 2018 #2 Why not use a regular List? Upvote 0
A afields Member Licensed User Longtime User Oct 14, 2018 #3 hello to all!. after having made some test i came to the conclusion that if the regular list does not have such methods ( like the one's that i've pointed Next, Prev and swap) i can always "extend" the regular list to have also those methods specially the swap one because i want to give the option to relocate an order up or down. so a simple question like the one that you've done is enough to resolve the problem! thank you erel. Solved! Last edited: Oct 14, 2018 Upvote 0
hello to all!. after having made some test i came to the conclusion that if the regular list does not have such methods ( like the one's that i've pointed Next, Prev and swap) i can always "extend" the regular list to have also those methods specially the swap one because i want to give the option to relocate an order up or down. so a simple question like the one that you've done is enough to resolve the problem! thank you erel. Solved!