[PD] open [openpanel] window in the patch folder

Roman Haefeli reduzent at gmail.com
Tue Jan 15 16:54:20 CET 2019


On Tue, 2019-01-15 at 13:28 -0200, Alexandre Torres Porres wrote:
> 
> 
> Em ter, 15 de jan de 2019 às 12:30, Roman Haefeli <reduzent at gmail.com
> > escreveu:
> > On Tue, 2019-01-15 at 13:35 +0000, Mario Buoninfante wrote:
> > 
> > > Would it be possible to use something like the following
> > > 
> > > [symbol ./(
> > > |
> > > |
> > > [openfolder]
> > > 
> > > to open the dialog window in the current patch folder?
> > > 
> > > This syntax works when you save or load files (ie with
> > [textfile]),
> > > but doesn't seem to work with [openpanel] and [savepanel].
> > 
> > The help file says that you can use [symbol <some path>( to open a
> > specific directory. However, when you give a relative path, it is
> > relative to Pd's start location, which is pretty useless. 
> 
> is it? cause it seems to me it's just not working at all!

I can currently only test on Linux, but yes it works. However, when
banging [openpanel] initially, it doesn't open in Pd's start location,
but in its "Home" which happens to be ~/Documents/Pd in my version of
Pd (0.49.1). When sending [symbol .(, it opens the directory I started
Pd from. I can open any directory when specifying it relative to the
one shown by [symbol .( . If the given relative path cannot be
resolved, it opens . (the start location) instead.

I don't know what the start location is on platforms where you double-
click an icon to launch the application. But you can easily figure that
out by sending [symbol .( to [openpanel]. From there, relative paths
should work. I guess, they do so also on macOS and on Windows once you
know where your starting point is. 

What I was trying to say  in my previous post is that relative paths
are pretty useless when they must be relative to this arbitrary
starting point, since the patch has no notion of that path. Most often
you want [openpanel] to show some directory relative to the main patch
of your project. For me, relative to patch would make much more sense.
I don't see any meaningful use case with the current implementation of
'relative to Pd's start location'. 

Roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20190115/4fc398b5/attachment.sig>


More information about the Pd-list mailing list