jkboyce / jugglinglab

Juggling Lab juggling animator
https://jugglinglab.org
GNU General Public License v2.0
86 stars 17 forks source link

Invalid file name suggested when saving jml #95

Closed hapiel closed 2 years ago

hapiel commented 2 years ago

When I try to save a pattern with an *, juggling lab suggests a filename that can't be saved, at least not on my windows machine.

afbeelding

This was the first time that I tried to save a pattern, and because there was no error message (simply nothing happened), I was confused and thought the saving feature didn't work, until I discovered that the * had to be removed.

As a fix I suggest to strip filename suggestions from special characters.

jkboyce commented 2 years ago

Hi @hapiel , thanks for the bug report! As a funny coincidence, I just today released version 1.6 which fixes this issue. It now strips disallowed characters from default filenames, and if you type a disallowed character into the filename it will alert you and prevent you from saving.

Now, that being said, it turns out ? and * are handled in a special way in Windows dialog boxes: If you type a filename with these into the dialog, they are treated as wildcards that filter the list of files you see. (? matches any single character, * any string of characters.) It won't let you save a file with one of these characters, but when you first see this filtering behavior it's a bit mystifying.

hapiel commented 2 years ago

Such timing, so fast! Thank you. I'm truly amazed that a project of over 25 years old is still developed this actively!

By the way, I will most likely be making a lot of use of juggling lab in the coming months for a project, and possibly even learning java to make some changes (they may not all be relevant to a larger audience, but if they are I can try to make pull requests).

During this time I'll likely come across some bugs and wishes (like I already have), is it helpful for you if I put every nitpick in an issue or is that just annoying? (Juggling lab is already pretty great as it is anyway!)

Thanks again!

jkboyce commented 2 years ago

Hi @hapiel, please by all means file your bugs and ideas as Github issues, just like this one. I would greatly appreciate it! It doesn't matter how nitpicky they are, any bug should be fixed and every idea has merit. Sometimes I let things sit on the list for a while I contemplate what to do about them.

It sounds like an interesting project you'll be working on -- if you can share more information at some point I'd love to learn more. If you're learning Java and have questions about how the code works, don't hesitate to ask.

Juggling Lab has been a rewarding long-term project. Sometimes I'll go a year or more without doing much on it, and sometimes I'll put in quite a bit of time. That's the beauty of an open-source project. :)