List object sort problem

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I have this list object and every line in the list begins with numbers. All of the lines are added during runtime (the list is blank beforehand). I have the sort feature enabled in the properties tab. However when I run the application and check the list, some are order while others (specifically some of the lines at the bottom of the list) are not ordered. Take a look at this screenshot:
    Please login to see this link.

    Any help?

    Custom A* Pathfinding in MMF2: Please login to see this link.
    Random Tile World Generation: Please login to see this link.

  • They're sorted in alphabetical order, not numerical order, that's all.
    Assuming they're all positive integers, just stick a few zeroes on the front:
    eg. Right$("000"+Str$( value ), 4)

    If you have decimals and negative numbers it gets more complicated:
    Left$(Str$(Min( value , 0)), 1)+Right$("0000"+Str$(Abs(Int( value ))), 5)+Right$(Str$(Abs( value ) mod 1), Len(Str$(Abs( value ) mod 1))-1)
    (that's one expression you could use)

    Edited 2 times, last by MuddyMole (November 25, 2012 at 4:55 AM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!