Restored from previous forum. Originally posted by Paul.
If anyone is looking for a fairly simple way to sort LinkedLists, you can check out my snippet on the PB Resources Site. http://www.reelmediaproductions.com/pb
It's not the more optimized but it does the job
It is also fairly easy to adapt to your existing LinkedLists once you see what is going on.
Restored from previous forum. Originally posted by Andre.
If anyone is looking for a fairly simple way to sort LinkedLists, you can check out my snippet on the PB Resources Site. http://www.reelmediaproductions.com/pb
Hi Paul, I would like to try it. But since the new layout of the site is used I can't download files anymore. There is no possibility to download files with right-mouse-click and choosing "Save as...", and when using left-mouse on the links "View" the download client gets started (have tried Gozilla and FreshDownload) and here is the problem: no file is saved correctly, every time (mostly at 99% download) there comes as disconnect while downloading and resume also failed.... Anyone, who have an idea ?
Restored from previous forum. Originally posted by Paul.
My first suggestion would be not to use download clients
A better suggestion though would be to double click on the filename you want to download. Information will pop up about that file... including the actually path were the file is located on the server.
You could copy and paste this path into your browser maybe?
Third suggestion would be to download the entire snippet package from the link at the top. You can still right click on that.
Restored from previous forum. Originally posted by Pupil.
If anyone is looking for a fairly simple way to sort LinkedLists, you can check out my snippet on the PB Resources Site. http://www.reelmediaproductions.com/pb
It's not the more optimized but it does the job
It is also fairly easy to adapt to your existing LinkedLists once you see what is going on.
Good work Paul!
I felt rather inspired by Paul's effort so i had to give it a try myself and come up with this little piece of code, though mine isn't as nicely commented as Pauls it will hopefully not be too difficult to understand;) The code is based on the god old bubble sort algo so it isn't a speed freak... Enjoy!
Restored from previous forum. Originally posted by Fangbeast.
If anyone is looking for a fairly simple way to sort LinkedLists, you can check out my snippet on the PB Resources Site. http://www.reelmediaproductions.com/pb
It's not the more optimized but it does the job
It is also fairly easy to adapt to your existing LinkedLists once you see what is going on.
Good work Paul!
I felt rather inspired by Paul's effort so i had to give it a try myself and come up with this little piece of code, though mine isn't as nicely commented as Pauls it will hopefully not be too difficult to understand;) The code is based on the god old bubble sort algo so it isn't a speed freak... Enjoy!
Paul did his sort in response to a query I had and then helped me fix my mistakes whch I always make. If you are only going to sort a small number of items, say less than a thousand or so, even on a small machine, the following routine makes use of PB's arraysort routine to do things nice and fast.
Procedure SortCategories()
Elements = 0 ; Starting elements = 0
Num = ListIndex(Cat()) ; How many categories do we have to work on
Dim CatSort.s(Num) ; Dimension the array witht eh number of categories
ResetList(Cat()) ; Reset the category list now
While NextElement(Cat()) ; Loop through elements, adding them to the array
CatSort.s(Elements) = Cat()\category
Elements + 1
Wend
SortArray(CatSort.s(), 2) ; Sort the string array
ClearList(Cat()) ; Clear the categories
For Start = 0 To Elements - 1 ; Add the items back into the linked list
AddElement(Cat())
Cat()\category = CatSort.s(Start)
Next Start
Dim CatSort.s(0) ; Clear the temporary array
ClearGadgetItemList(#CategoryTree) ; Clear the category tree
ReDisplayCat() ; Redisplay sorted category
EndProcedure