files not loaded alphabetically in mojave

  1. 3 months ago

    Hello,
    after upgrading from Sierra to Mojave, I noticed that files loaded from a folder are not loaded alphabetically.
    The folder contains about 80 files named 01, 02, 03 etc., and the code is the usual:

    mArray() as string
    for i as integer = 1 to f.count
    doSomethingWith f.trueItem(i)
    next

    where I expect the result of the loop to depend on alphabetically loaded files.

    So now, in Mojave, I changed the approach, creating an array of all the f.trueItems(i).NativePath, sorting the array, and then performing the job using the array.

    Is there a more simple way? Suggestions welcome.
    Thanks.

  2. I do not think that the list of file names in a folder has ever been guaranteed to be in alphabetical order by Xojo or macOS.

    But it is nice to know how Mojave behaves.

  3. Edited 3 months ago

    Yes, you are right: there has never been any guaranty, especially (I guess) if file names started with capital and non-capital letter.
    And I would add that usually one sorts a listbox after loading files. But in this particular in-house project, since files named 01, 02, 03 worked fine, I never bothered to apply the right approach.

  4. Well I guess we all need to be more careful from now on

  5. Jeff T

    Dec 26 Midlands of England, Europe

    Ive seen this behaviour for a while now (High Sierra) ..it came in with the APFS file system.

    files named 01, 02, 03 worked fine, I never bothered to apply the right approach.

    Much less than 1% of my customers ever mentioned the problem. I'd estimate less than 1% were using APFS, but new installs of Mojave

    Is there a more simple way?

    I havent found one yet.
    It adds a few extra lines of code, but it has the advantage that you can custom sort if you wish.. (maybe you display grouped by type, then by alphabetic filename...)

  6. @Jeff T

    ..it came in with the APFS file system.

    I upgraded to Mojave directly from Sierra, and I see that my file-system is APFS. Actually I do not know what file-system I had with Sierra. Could it be that installing Mojave the file-system too gets changed? I'm no expert on this topic.

  7. Beatrix W

    Dec 26 Pre-Release Testers Europe (Germany)

    The installer asks you if you want to convert to AFPS.

  8. Emile S

    Dec 26 Europe (France, Strasbourg)

    Funny (different): I uploaded files in my Web “MediaFire” account yesterday and noticed the files were sorted by file size (smaller first / larger last). El Capitan.

    Back to the OP: the idea is to load all files name for the target folder in an array, sort the array and use the result the way you actually do (recreation of a FolderItem using the FolderItem [Parent] and use it in the project).

    I hope this is clear enough.

  9. Edited 3 months ago

    @Beatrix W

    The installer asks you if you want to convert to AFPS.

    So I may have missed it. Were you asked at the end of the installation process? Because I'm sure I was not asked at the beginning.

    [Edited]

    From Disk Utility:
    Type: APFS Volume
    Connection: PCI
    Device: disk1s1

    From System Report:
    EFI:
    Capacity: 209.7 MB (209,715,200 bytes)
    File System: MS-DOS FAT32
    BSD Name: disk0s1
    Content: EFI
    Volume UUID: 0E239BC6-F960-3107-89CF-1C97F78BB46B
    disk0s2:
    Capacity: 250.79 GB (250,790,436,864 bytes)
    BSD Name: disk0s2
    Content: Apple_APFS

  10. Dave S

    Dec 26 San Diego, California USA

    @Carlo R The installer asks you if you want to convert to AFPS.

    If it asked, I never remember seeing it either..... and my system internal drive *IS* now APFS (and I would have answered NO, if I'd been given a choice).... my external drives are all HFS+

    That is unless it was already APFS (I bought it new Aug2017)

  11. Sam R

    Dec 26 Pre-Release Testers, Xojo Pro Hengchun, Pingtung, Taiwan

    @Carlo R So now, in Mojave, I changed the approach, creating an array of all the f.trueItems(i).NativePath, sorting the array, and then performing the job using the array.

    This is going to be the most reliable way to ensure that your files are loaded alphabetically, regardless of the OS.

  12. Sam R

    Dec 26 Pre-Release Testers, Xojo Pro Hengchun, Pingtung, Taiwan

    @Beatrix W The installer asks you if you want to convert to AFPS.

    I know it used to with High Sierra, but like others I don't recall seeing it as an option when I updated to Mojave (from 10.10).

  13. Emile S

    Dec 27 Europe (France, Strasbourg)

    @Carlo R File System: MS-DOS FAT32

    What this is doing there ? (Windows XP file System !).

    Did you format your hard disk when you purchased it ?
    How long does it takes (seconds or hours) ?

    If No Or Yes and seconds: you have troubles with your hard disk.

    Make a backup of your data on another hard disk,
    Format your hard disk (this may takes hour to hours (depends on the size / HDD-SSD)
    Install Mojave back to your hard disk,
    Install back your data.

    Just in case (I can be wrong): what people here think about what I wrote above ?

  14. Sascha S

    Dec 27 Pre-Release Testers, Xojo Pro Germany
    Edited 3 months ago

    @Emile S File System: MS-DOS FAT32: What this is doing there ? (Windows XP file System !).
    ...
    Just in case (I can be wrong): what people here think about what I wrote above ?

    This is correct because the EFI Partitition must be based on a FAT-Filesystem for backward compatibility.

  15. Emile S

    Dec 27 Europe (France, Strasbourg)

    @Sasha: on macOS ?

    FAT32 cries when you attempt to store a > 4GB file.

    And, I do not have that in my System Report’ SATA/SATAExpress/ APPLE SSD SM0256F / EFI (Same UUID !).
    Nota: El Capitan.

    Mojave takes “five cup of tea time to dring” from boot HDD to the moment I can fire System Report !

    But, if you are sure (even if this looks strange to me)…

    My Boot external Mojave also do not asked me about APFS (but it is APFS: I cannot access to its contents when I am running El Capitan…).
    Or: I forgot (or wanted to know what it looks like).

  16. Sascha S

    Dec 27 Pre-Release Testers, Xojo Pro Germany

    @Emile S @on macOS ?

    Yes, because your machine has just finished the POST process.

  17. Sascha S

    Dec 27 Pre-Release Testers, Xojo Pro Germany

    BTW While updating to High Sierra, the Installer was asking me if i want to convert to APFS. While updating from High Sierra to Mojave, it was not asking me but informed me it will convert my internal Drive(s) from HPFS to APFS.

    But it should still be possible to install without APFS conversion with the --converttoapfs NO switch.

  18. Emile S

    Dec 27 Europe (France, Strasbourg)

    Hi Sasha: you were right…

    A friend of mine come to drink a cup of tea (he must heard me…), so while talking together, I booted on my Mojave HDD.

    I learned one more thing today…

    Hey Apple, what about a more recent FS (like NTFS) ?

  19. Sascha S

    Dec 27 Pre-Release Testers, Xojo Pro Germany

    @Emile S Hey Apple, what about a more recent FS (like NTFS) ?

    NTFS is a robust FS released in 1992. I would not call it a more recent FS. Apple File System has been released to the public in 2017 and is indeed a recent FS. I am pretty sure that NTFS also had it's flaws when it had been released and matured over time.

    Both have their pros and cons. But for EFI a simple FS (without Journaling and other fancy stuff) is recommended.

  20. @Emile S

    Did you format your hard disk when you purchased it ?

    No. I never formatted my hard disk. My MBP is a late 2013. Whatever happened to it, it was silently/automatically done by Apple.

  21. Newer ›

or Sign Up to reply!