Hi,
It would be great if we had something that allows to start [openpanel] / [savepanel] in the patch directory.
Using [bang( seems to open the directory from which Pd has been launched, while using [symbol ./( (in case of MacOS Sierra) opens the OS X directory.
since the help says a bang "Starts open panel in current directory", I consider this a bug.
what's "the OSX directory"?
i don't have any such thing on my Linux machine, and on your macOS machine i guess all directories are "OSX directories"?
from testing with the help file, I got the HD root directory in macOS 14, Pd 0.49-1
@umlaeute it opens a dialog here: "/" (that is basically the machintosh HD) (the same place you reach when from the terminal you type "cd /"). I'm not a Mac user as well, so I could probably say something wrong here, but I suppose that's the root directory in Mac (similar to Linux). And the folder, only this, is called "OSX"
Alternatively, a more flexible enhancement would be an object which returned the full path of the directory of the patch it is within.
This could in turn be passed to [openpanel], if desired, but a user-supplied path could overrule it.
I think now that when the documentation says a bang "Starts open panel in current directory", it just means the last opened (hence 'current') directory.
So this could be in fact a feature request and not a bug, where we could have two options to deal with it;
Only the second option does the job, but we could also have both solutions, since such a new object is desired for other purposes in Pd.
I think your second option is the superior one, as it gives the most flexibility. For instance, I may just want the directory of the current patch as the root; I may want to add a path onto it to access a specific directory within my patch鈥檚 directory.
I tried to see if I could implement option 1 and I failed miserably...
I'm happy if we only have the second option as a solution, anyway, I think we need it one way or another. Pd has to have new object that deals with directories and stuff. By the way, there have been parallel discussions on adding such a new object.
and option 2 is available here :) #617
Now that we have [pdcontrol], can we close this?
Personally, I think the current behavior (starting in the last directory) is fine as the default case, but if you need to start from the current patch, you can simply do [dir( -> [pdcontrol] -> [openpanel]
i think so. closing now. stand up if you disagree.