Reorder Listbox to alphabetical order (APFS)

Hello,

I would like to see if someone can help me, I use a Listbox with super (volumebrowser class), until Sierra the list is populated in alphabetical order but from High Sierra, Mojave it is populated in a random way that I can’t understand, someone already had and solve this problem ?

I saw in other posts that it seems to be a matter of APFS, question, how can I reorganize after populating the listbox giving a manual refresh for example?

I still use XOJO 2017 (2.1)

Tanks.

The catalog order is not alphabetically returned by defalt.

Sort it. 'There is an instruction to do that). (There is also an event to put your own code to sirt the data).

Also, you can set a SQLite db in memory and sort it at read time.

[quote=494371:@Paulo Vargas]Hello,

I would like to see if someone can help me, I use a Listbox with super (volumebrowser class), until Sierra the list is populated in alphabetical order but from High Sierra, Mojave it is populated in a random way that I can’t understand, someone already had and solve this problem ?

I saw in other posts that it seems to be a matter of APFS, question, how can I reorganize after populating the listbox giving a manual refresh for example?

I still use XOJO 2017 (2.1)

Tanks.[/quote]
Build an array of volume FolderItems, build an array of the FolderItem names and then do something like: folderItemNameArray.SortWith(folderItemArray)

Hello Kevin.

I’ve never done this before because I use a Volumebrowser class that I got from years ago, could you give me a light on how I do this, where would there be any example that I can rely on because I’m completely lost?

[quote=494378:@Emile Schwarz]The catalog order is not alphabetically returned by defalt.

Sort it. 'There is an instruction to do that). (There is also an event to put your own code to sirt the data).

Also, you can set a SQLite db in memory and sort it at read time.[/quote]

Hello Emile,

I don’t use SQLite, I have a very old class (Volumebrowser) that reads a folder on the mac and returns it to me in a listbox, has any tips on how I can solve this, would have some example documentation because I have no idea how to do it, I’ve tried but I haven’t found how do ?

Thanks and any help is welcome !

Did you made a seach for this in this forum ?

I am quite sure this already came here.

[quote=494444:@Emile Schwarz]Did you made a seach for this in this forum ?

I am quite sure this already came here.[/quote]

Yes Emile, I searched but I couldn’t find any example that can be based, would you happen to know how I change the order to alphabetical by clicking on the colapserow (triangle) on listbox for example?

If I activate HasHeading I can reorganize the master folder but not the subfolders that have closed triangles.

I already got an alternative solution, after loading the list I organize it with the Sort function with a timer.

Thanks to anyone who tried to help me, I am very grateful !