Hi,
Is there a way, with [openpanel] or [savepanel] or another object if any, to have the user browse for files and be allowed to select a directory? As far as I can see, these two object only allow you to select a file; the only way to select a directory would be to navigate to the parent directory, and then write the directory name manually, but that's not very intuitive..... Perhaps some configuration message to be sent to the [*panel]?
thanks m.
Matteo Sisti Sette escribió:
As far as I can see, these two object only allow you to select a file; the only way to select a directory would be to navigate to the parent directory, and then write the directory name manually, but that's not very intuitive.....
That doesn't even work indeed
2009/12/8 Matteo Sisti Sette matteosistisette@gmail.com
Matteo Sisti Sette escribió:
As far as I can see, these two object only allow you to select a file; the
only way to select a directory would be to navigate to the parent directory, and then write the directory name manually, but that's not very intuitive.....
That doesn't even work indeed
hey Matteo,
If you have pd-extended, you should have [dirpanel] ( http://lists.puredata.info/pipermail/pd-list/2006-02/035865.html )
Tim
tim vets escribió:
hey Matteo,
If you have pd-extended, you should have [dirpanel] ( http://lists.puredata.info/pipermail/pd-list/2006-02/035865.html )
Thank you,
At the moment I am using PD-Vanilla so I was wondering if there was a way to do that in vanilla. I guess I will have to install the external, or switch to extended...
Similarly, the [playlist] external allows what you are looking for. Maybe it's time to come in out of the cold ;-)
D.
Matteo Sisti Sette wrote:
At the moment I am using PD-Vanilla so I was wondering if there was a way to do that in vanilla. I guess I will have to install the external, or switch to extended...
Derek Holzer escribió:
Maybe it's time to come in out of the cold ;-)
Last time I had a trip out of the cold (i.e. installed the latest version of pd-extended) it systematically crashed when trying to open the patch I had to open, which works in latest vanilla plus latest gem.
That was few weeks ago.
It may be quite simple but, now that it's done...
I attach a [lastindexof] abstraction (which uses a [truncatesymbol] abstraction also attached) which searches for the last occurrence of a given character in a symbol. I use it to search for the last occurrence of "/" in a full path, in order to separate the path from the file name.
It takes the character to look for in the right inlet (as symbol), or as a creation argument. When input a symbol in the left inlet, it outputs the index of the last occurrence of the given character, or -1 if it is not present.
It can be easily modified to search for the _first_ occurrence ([indexof]) and it should not be difficult to modify it so that the searched symbol could be of any length (mantaining the same computational inefficiencies it has now)
I am a vanilla purist (no disrespect at all to pd-extended)...
Ah, the [truncatesymbol] abstraction, which is basically a settable [makefilename %.$1s], also manages the case of 0 characters by returning a null symbol.
Dunnow if it will be of any use to anybody.....
bye m.