Patches item #1981332, was opened at 2008-06-01 10:38 Message generated for change (Comment added) made by mrpeach You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1981332...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: puredata Group: feature Status: Open Resolution: None Priority: 5 Private: No Submitted By: Martin Peach (mrpeach) Assigned to: Nobody/Anonymous (nobody) Summary: add path arg to openpanel and savepanel
Initial Comment: This patch adds a path argument to openpanel and savepanel which is saved whenever the enclosing patch is saved. I used A_GIMME for the argument, but only a single symbol will be used, any other args will be quietly ignored.
----------------------------------------------------------------------
Comment By: Martin Peach (mrpeach)
Date: 2008-06-02 13:38
Message: Logged In: YES user_id=919007 Originator: YES
...and periods of course. Part of the problem is that odd characters in filenames can get mangled by intervening software, as in the case of Pd, where you can't use { } or \ in a filename because you can't enter it, you get a message like "keycode 92: dropped" instead.
----------------------------------------------------------------------
Comment By: Martin Peach (mrpeach) Date: 2008-06-02 13:22
Message: Logged In: YES user_id=919007 Originator: YES
Of course you're right. In my experience of cross-platformity though it's best to use underscores instead of spaces, never start a filename with a number, and otherwise use only alphanumeric characters in file names. It just _always_ works that way.
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave) Date: 2008-06-02 13:04
Message: Logged In: YES user_id=27104 Originator: NO
FYI: commas are valid in all the major filesystems, EXT2/3, HFS+, NTFS, XFS, etc. I think even FAT supports commas. Same with semi-colons.
Basically, the NTFS restrictions are the common denominator (http://en.wikipedia.org/wiki/NTFS), you can't use these characters:
U+0000 (NUL) / (slash) \ (backslash) : (colon) * (asterisk) ? (Question mark) " (quote) < (less than) > (greater than) and | (pipe)
EXT2/3 only limits (NULL /) and HFS+ APIs limit (NULL / :)
----------------------------------------------------------------------
Comment By: Martin Peach (mrpeach) Date: 2008-06-02 12:08
Message: Logged In: YES user_id=919007 Originator: YES
OK, here is a patch that just makes a path from all the arguments. If the path doesn't work it seems to be quietly ignored by tcl. Not sure which OSs allow commas in file names...
File Added: panelpatch2.diff
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave) Date: 2008-06-01 18:54
Message: Logged In: YES user_id=27104 Originator: NO
how about using all of the arguments as the path name? That way you can easily include paths that have spaces in them, which are quite common. you can see an example of how to convert the argv t_atom list to a binbuf then to a string here, in function print_new():
http://pure-data.svn.sourceforge.net/viewvc/pure-data/branches/pd-extended/v...
Ideally, it would also handle commas, etc.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1981332...