Replies: 3 comments 2 replies
-
Hi Derek, looks like not many people discovered Discussions already. Bummer... Unfortunately I cannot really help as my old employer, for whose apps I mainly developed this project, still releases with the uncompiled version of the launcher stub. I try to answer a couple of your questions anyway:
This has indeed been fixed. Please use v3.2.0+
Have a look here to see how I implemented this with
Sounds like a good way to go – although you mentioned some caveats...
You can search the current spec for the After a quick skim of the docs, I'm afraid I don't see an option. Also Best, Tobias |
Beta Was this translation helpful? Give feedback.
-
Hi, I have sent some time looking at this over the past few days. Moving to FileDialog brings its own problems. There are many posts on the web of it not playing well with other OSs when it comes to filtering. So I decided to start changing my extended, derived class of JFileChooser to not extend it but embed it so I could then decide whether or not to use JFileChooser or FileDialog depending on the platform. In this way any changes I make to use FileDialog are then invisible to my applications. This is going well, I have test classes working in a way that would be transparent to my programs and I can now use either JFileChooser or FileDialog in a manner that is transparent to my programs, but I hit a hurdle again on file filtering. Thanks to your example, I can filter files in FileDialog, but you have no option of choosing from a set of File Filters, which you can do with JFileChooser. See example below of what I am doing in JFileChooser. This is what I want to be able to do, but have found no way to add similar capability to FileDialog This is quite important to me when saving files. For example by changing the filter to a different file type, the user can then save out to a different file format (think of how in Excel you can save to XLSX, XLS or CSV) So I really want to do the following in FileDialog, which is what you can do in Apps like Excel and which JFileChooser allows So unless I can do this in FileDialog I am starting to think the best approach is allowing the installer to install the appropriate launcher on OS X depending on the version. Then in my properties file for the app I can write the OS version when the application was last run. This would allow me to test and detect on startup a change in OS version, and then if warranted advise the user to reinstall the application. But that all feels a bit clunky. I suppose the other option is to try a later version of Java (I am on Java 11 right now, as the LTS version) and see if that fixes the issue as well. Any thoughts appreciated. |
Beta Was this translation helpful? Give feedback.
-
FWIW, the compiled version for 10.15 worked for me on the macOS 10.14.6 (Mojave) until today's security update, after which the app's (trolCommander) icon was "blocked" and an error message appeared saying I needed 10.15 at least. I switched to the script version, but it seems that the version check is only formal and the current 10.15 version could be compiled with settings allowing to support older macOS versions? (Title of this thread is confusing saying "iOS"...) |
Beta Was this translation helpful? Give feedback.
-
Hi,
As Tobias has enabled discussions, I thought I would start a discussion. :-)
I have been using the compiled version of the script since Apple introduced the Privacy restrictions (see #85), but when I updated to Big Sur, I found that this was not working initially (although it would if you opened the APP from the command line - for some reason double clicking the app failed to detect the right JVM), but this now appears fixed as well when I checked the latest build a month or so back.
I need to do a new build and release of my applications (long overdue now!), but I have started thinking about the best way of dealing with different versions of OS X out there, as I cannot guarantee what version a user is running on.
The simple answer would be to just use the non-compiled script and forgo the ability for uses to access files in their document folders.
Next, I could update my apps not to use JFIleChooser, but that is actually a lot of work, and, unless I am missing something, the standard file dialog has no support for file filtering? If anybody knows how to do filtering in FileDialog, please enlighten me.
So I was thinking of dealing with this by my IzPack installation script detecting the OS Version and copying the appropriate version
This probably gives best compatibility. But of course if a user upgrades to 10.15 or to 11.x then a working application will be broken unless the user re-installs, which would then copy the right launcher.
Or is there an option in the PLIST to use a different launcher depending on the OS version?
Has anybody else given this some thought and/or have a working solution? And I would be interested to know what other people are doing.
As I said above, I could just go for the non-compiled script and save all of this trouble, but I don't like the idea of the user not being able to access folders that he may have placed in their document folder (for example).
Beta Was this translation helpful? Give feedback.
All reactions