Patches item #1981332, was opened at 2008-06-01 07:38 Message generated for change (Comment added) made by millerpuckette 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: Duplicate 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: Miller Puckette (millerpuckette)
Date: 2010-07-28 20:45
Message: This would make openpanel and savepanel the only two non-graphical objects to save their state in Pd -- probably we should do this either with everything in Pd (ugh) or invent something different. In fact there's no way to store a symbol non-volatilely in Pd (except using data structures, way too complicated to set up) so something else is needed.
----------------------------------------------------------------------
Comment By: Martin Peach (mrpeach) Date: 2008-06-03 06:23
Message: Logged In: YES user_id=919007 Originator: YES
Not quite. My original intent was to add the ability to save and restore the current path to/from the .pd file, so I added save functions. A side effect of that is that it is now also possible to specify a path in the creation argument. A snag with that is that the displayed argument doesn't change when the current directory changes.
----------------------------------------------------------------------
Comment By: IOhannes m zmlnig (zmoelnig) Date: 2008-06-03 00:02
Message: Logged In: YES user_id=564396 Originator: NO
isn't that a dupe of:
http://sourceforge.net/tracker/index.php?func=detail&aid=1244757&gro...
----------------------------------------------------------------------
Comment By: Martin Peach (mrpeach) Date: 2008-06-02 10: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 10: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 10: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 09: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 15: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...