umenu populate order

andrea agostini's icon

Hi folks.

I see that whenever I populate an umenu, the filenames it contains appear to be alphabetically (well, lexicographically) sorted (OSX 10.6.8).
Can I always count on this, even on Windows, or should I sort them to be sure?

Thanks
aa

Peter Castine's icon

It's been a long time since I tried this, but it used to be that umenu was simply populated in the order the host OS listed the files in the API calls. On Mac OS this has always been alphabetical order. On Windows, however, the OS used to list files in chronological order of creation date (or something like that).

The order in which the Windows File System calls report files may have changed, or umenu may have changed since then. You need to test on Windows to be sure. And you may need to sort if having alphabetical order on Windows is important to you.

andrea agostini's icon

Thank you Peter - I'll sort the filenames!

cheers
aa