Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Savepanel object issues and discrepancy with Vanilla counterpart. #1911

Open
sidec opened this issue Oct 21, 2024 · 7 comments
Open

Savepanel object issues and discrepancy with Vanilla counterpart. #1911

sidec opened this issue Oct 21, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@sidec
Copy link

sidec commented Oct 21, 2024

There are still problems with savepanel object that makes its behaviour inconsistent with its Vanilla counterpart and overall just inconsistent with other object that deal with file and directory paths, at least on MS Win 10/11 platform.

Firstly, it returns path with backward slashes, in contrast to openpanel and file objects that give and deal with paths constracted with forward slashes (unix style delimeter). This can be dealt with by placing file normalize object after savepanel but obviously this is a hack and shouldn't be necessary.

Secondly, savepanel does not take into account whether a path is given - to open the system dialog at a specific location on the filesystem. This is demonstrated in the patch below by passing the file location from the pdcontrol object. Instead, it opens the file selection dialog at the last location where the system browser was used in pd (for example via openpanel).

Here is the patch that demonstrate forementioned issues.

As mentioned, OS is Windows 11/10, PlugData version 0.9.1

#N canvas 827 239 762 550 12;
#X obj 82 37 bng 25 250 50 0 empty empty empty 17 7 0 10 #e4e4e4 #4d4d4d #373737;
#X obj 82 165 savepanel;
#X obj 283 37 bng 25 250 50 0 empty empty empty 17 7 0 10 #e4e4e4 #4d4d4d #373737;
#X msg 153 71 dir;
#X obj 153 97 pdcontrol;
#X msg 337 71 dir, f 4;
#X obj 337 97 pdcontrol;
#X obj 283 165 openpanel;
#X obj 65 287 file normalize;
#X listbox 65 320 46 0 0 0 - - - 16;
#X obj 82 191 t a a;
#X listbox 93 243 33 0 0 0 - - - 16;
#X listbox 283 191 42 0 0 0 - - - 16;
#X connect 0 0 1 0;
#X connect 1 0 10 0;
#X connect 2 0 7 0;
#X connect 3 0 4 0;
#X connect 4 0 1 0;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 7 0 12 0;
#X connect 8 0 9 0;
#X connect 10 0 8 0;
#X connect 10 1 11 0;
@porres
Copy link
Collaborator

porres commented Oct 21, 2024

can you upload the patch as a zip file?

screenshots are also nice :)

@sidec
Copy link
Author

sidec commented Oct 22, 2024

sure, here is the patch
savepanel-bug.zip
and a screenshot
image

@porres
Copy link
Collaborator

porres commented Oct 22, 2024

I was hoping you cold show in the image the backslashes.

Anyway, I don;t get the backslasehs in my mac, the rest I can confirm. I can summarize this [savepanel] issue as

  • symbol input does not set saving folder
  • outputs with backslashes in windows

@porres porres added the bug Something isn't working label Oct 22, 2024
@sidec
Copy link
Author

sidec commented Oct 22, 2024

Fair enough, here the backslashes:
image
I don't have backslashes on Linux neither, so this issue is specific to Win

@sidec
Copy link
Author

sidec commented Oct 25, 2024

just a note on the side, instead of uploading screenshots or zips, it is possilble to save on manual labour by simply coping the entire text in patch listing except the first one containing #canvas, and paste it from the clipboard into a new patch in PlugData. So cool that.

@timothyschoen
Copy link
Collaborator

Should be fixed!

@sidec
Copy link
Author

sidec commented Oct 28, 2024

Hi,
I tested last nightly build: e493ff4 from yesterday which should bring Pd vanilla compatability and it seems that
there still are discrepancies. So efectively Pd approach accross of all supported OSs is to adopt unix forward slash delimiter in
system paths (with drive letter at the begining on Windows).
So for comparision the same patch in PlugData and PD:
Actual:
image
Expected:
image

The other issue I found in latest builds is that banging openpanel and savepanel after they have been used doesn't open file browser.
So @timothyschoen could you reopen the issue or should I create another one?

@porres porres reopened this Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants