• Editor
  • Use OS default open/save dialog window?

Related Discussions
...

I don't know about the Windows and Linux version, but on Mac OS X the custom file open/save dialog window is less than ideal.

Would it be possible to simply use the operating system's standard dialog?

I know the file dialog is a bit nasty on the Mac. Maybe we can use the native dialog at some point in the future, but there are many other things to do right now. 🙂

Fair enough, the current dialog is usable in the meantime, if a bit clumsy. Thanks!

8달 후

Hi guys,
are you planning to implement this feature anytime soon?

On the mac it's really a big pain,
I'm exporting or saving really often and working with the dialog on Mac - as it is right now - is so much time-consuming...
😢

Thanks!

It's not high priority I'm afraid. We will get to it, but there are many other things to work on. 🙁 One thing that helps is to copy and paste paths from Finder instead of using Spine's terrible file dialog. To help with that, you can use the Copy Path app in this zip:
http://n4te.com/tools/mac_util.zip
You can drag the Copy Path icon into your Finder toolbar, then select a file, click Copy Path, go to Spine's file dialog, paste the path, press enter.

The zip also has two other utilities that are useful in the Finder toolbar.

Thanks Nate,

I have tried the utility you suggested, but I didn't success with pasting the path into the Spine.

But I have found a much better hack:

  1. go to "save project as" dialog or "open project" so the dialog is open
  2. open a finder window next to Spine window, locate the folder / file which you want to open / save
  3. drag & drop the folder / file on the Spine dialog
  4. MAGIC HAPPENS
  5. the Spine open/save dialogs path is now set to the file

It's a huge timesaver.
Still not ideal, but much much better than locating it form the dialog.

BTW when you will be implementing the dialog for OS X,
it's just changing a line / few lines of code.
Changing the multiplatform

JFileChooser

for

FileDialog

More info here under the "Working with Windows and Dialogs"
https://developer.apple.com/library/mac/documentation/java/conceptual/java14development/07-NativePlatformIntegration/NativePlatformIntegration.html

Cheers!

I knew about FileDialog, but it can only select files, not directories. However, your link tells about a system property so FileDialog can select directories on OSX. Nice! 🙂 I've made the changes so FileDialog is used on OSX when it can be. It will be in the next version.

Note it is not so simple as just using FileDialog, as Linux still needs to use JFileChooser to select directories. Also, when not using an Apple JVM (such as the bundled OpenJDK), I doubt the system property will work. In that case JFileChooser needs to be used.

Wow you're really awesome! :beer: :beer: :beer: :beer: :beer:

Yeah, i's probably more complicated than it seemed to me, I'm not an engineer so I shouldn't be talking too much about code, sorry :$ .
Anyway, if you would put this as a feature to Kickstarter, I would be happy to back it 🙂

Looking forward to upcoming features,
I'm getting more and more into Spine's workflow and it's really really awesome!

Thanks!

Thanks! 🙂 Nah, this is no KS feature. It gets added as a regular update:
http://esotericsoftware.com/spine-changelog/
The KS features will be really freaking cool!

It's available now. Can you try out the new file dialog on Mac? I'd like to know if it works both with the system Java and also with OpenJDK. Note OpenJDK is used when you run "Spine.app", the one that says system Java is, well, system Java. 😃

Image removed due to the lack of support for HTTPS. | Show Anyway

Tested!

I have Java 7 installed in which is a bug causing that folders cant be selected in the dialog.
The OS X system Java is 6, where it works all right.

So:

Running "Spine.spp" (I have Java 7 installed)
When I select the folder and press Open button, it opens it.
When I select an .png it inserts the path "/path/path/image.png - then when i remove "image.png" it works fine.

Running "Spine (system Java).app"
Works like a charm! Opening, saving, selecting path for images.

But I didn't try to run "Spine.app" with Java 6 installed.

I had also an issue with setting ".spine" files to be opened by default by Spine app, but I have found out that the problem is somewhere at my side. So It's all right.
https://discussions.apple.com/thread/1140217?start=0&tstart=0
https://discussions.apple.com/thread/5086554?start=0&tstart=0

One last unimportant thingy:
when Saving, the dialog puts there not just the file name, but puts there the whole path with it.
No need to do anything about it. I'm saying this just so you can be aware of it.

Image removed due to the lack of support for HTTPS. | Show Anyway

Thanks!!! You just saved all mac users a lot of time. :beer:

When you run "Spine (system Java)" it uses whatever Java you have in OSX. When you "Spine.app" it runs using OpenJDK bundled with Spine. So it sounds like OpenJDK doesn't handle selecting folders. 🙁 I can't test this as OpenJDK doesn't run on my Mac, I have to use system Java.

I could make the old, nasty file dialog appear for OpenJDK, or users can just deal with having to delete the file name to select a path. Deleting the file name seems pretty tricky, so I guess users should get stuck with the crappy dialog. What do you think?

You're right.
We've just tested it.

Well, the "selecting path" scenarios with OpenJDK are:

1) old dialog:
pain, but intuitive (the user wont get anything what looks like error / bug).

2)new dialog:
much less pain, but every user who isn't familiar with the issue wouldn't know what's happening (user would be lost, it might look like a bug). That's majority of existing users + all new users.
I think it's not worth it doing this.

If you could set the new one for Save/Open and the old one for setting images path - it would be the best for now, but I guess it's a global setting so that wouldn't be easy so thats not a good option.

So,
I would go for the old dialog in the OpenJDK.

Those who have Java will can work with the System Java version.

Those who haven't - will work in the OpenJDK plus they can still install Java and then use System Java.
They can find out here at forum, or maybe would be good to put this information to the change log / read me file / documentation, so it's easier to find.
Its more than good for now, maybe can be fixed in future. Now I guess you have more cool features to work on 🙂

Still - it's a huge improvement because now there is the option with the system java app 🙂

I went with using the JFileChooser on OSX if the JVM is OpenJDK and you need to choose a folder. If you need to choose a file (eg open project) then it always uses FileDialog on OSX. Well, it will starting in version 1.6.14. 🙂

Wow that is awesome!!!
You're the boss! 8)