Login  Register

Problem with alphabetical order of items in menus and from getFileList

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Problem with alphabetical order of items in menus and from getFileList

lechristophe
419 posts
Hi,

I have a problem with ImageJ (in its Fiji form) on one of my computers.
Some menus are not ordered alphabetically anymore, such as the LUTs menu
(see screenshot here https://i.imgur.com/IvX56M1.png). Also the macro
function getFileList() does not return an alphabetically ordered list.

I think it is since I used a particular plugin (SMLocalizer) that uses
Swing instead of the classical interface, but I am not sure of this. I have
another similar computer (Mac under 10.13.2 High Sierra, Java 1.8.0_101)
where the problem does not happen. I tried reinstalling the Fiji install
from this other computer (including IJ_prefs.txt and ImageJ.plist),
reinstalling Java, nothing I could do would get the alphabetical order back.

Anyone has a clue about what happened and how I could try to correct this?

Thanks,

Christophe

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Problem with alphabetical order of items in menus and from getFileList

Michael Schmid
2136 posts
Hi Christophe,

looking at the source code for the getFileList macro function,
   
https://github.com/imagej/imagej1/blob/master/ij/macro/Functions.java#L1419
it seems that ImageJ uses the sorting sequence provided by the operating
system except for Linux, where sorting is done by ImageJ. There is no
sorting done by Java in its File.list method.

Recently there has been a similar report on this mailing list that the
new MacOS HighSierra does not sort file names:
   
https://list.nih.gov/cgi-bin/wa.exe?A2=ind1712&L=IMAGEJ&P=R21474&1=IMAGEJ&9=A&J=on

So, could your problem be related to the new MacOS version, and the
computer with nicely sorted files names running a different (older)
version of MacOS?

Then it seems to be a MacOS High Sierra related issue, see
   https://discussions.apple.com/thread/8178786

This is possibly related to sorting in MacOS now being done by the Mac
Finder, as required by the Finder's "Keep folders on top" advanced
option.

Michael
________________________________________________________________

On 2017-12-30 10:16, Christophe Leterrier wrote:

> Hi,
>
> I have a problem with ImageJ (in its Fiji form) on one of my computers.
> Some menus are not ordered alphabetically anymore, such as the LUTs
> menu
> (see screenshot here https://i.imgur.com/IvX56M1.png). Also the macro
> function getFileList() does not return an alphabetically ordered list.
>
> I think it is since I used a particular plugin (SMLocalizer) that uses
> Swing instead of the classical interface, but I am not sure of this. I
> have
> another similar computer (Mac under 10.13.2 High Sierra, Java
> 1.8.0_101)
> where the problem does not happen. I tried reinstalling the Fiji
> install
> from this other computer (including IJ_prefs.txt and ImageJ.plist),
> reinstalling Java, nothing I could do would get the alphabetical order
> back.
>
> Anyone has a clue about what happened and how I could try to correct
> this?
>
> Thanks,
>
> Christophe
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Problem with alphabetical order of items in menus and from getFileList

Wayne Rasband-2
427 posts
On 2017-12-30 10:16, Christophe Leterrier wrote:

> Hi,
> I have a problem with ImageJ (in its Fiji form) on one of my computers.
> Some menus are not ordered alphabetically anymore, such as the LUTs menu
> (see screenshot here https://i.imgur.com/IvX56M1.png). Also the macro
> function getFileList() does not return an alphabetically ordered list.
> I think it is since I used a particular plugin (SMLocalizer) that uses
> Swing instead of the classical interface, but I am not sure of this. I have
> another similar computer (Mac under 10.13.2 High Sierra, Java 1.8.0_101)
> where the problem does not happen. I tried reinstalling the Fiji install
> from this other computer (including IJ_prefs.txt and ImageJ.plist),
> reinstalling Java, nothing I could do would get the alphabetical order back.
> Anyone has a clue about what happened and how I could try to correct this?
> Thanks,
> Christophe

This is a problem with APFS (Apple File System), which is only supported on macOS High Sierra and only with SSDs. File systems using the Mac OS Extended (HFS+) format do not have the problem. Apple will probably fix this since it afflicts many Mac applications. In the meantime, the latest ImageJ daily build (1.51t22) works around this bug for LUTs listed in the Image>Lookup Tables menu and for file names returned by the getFileList() macro function.

-wayne
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html