[PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
Martin Peach
martin.peach at sympatico.ca
Fri May 30 19:19:11 CEST 2008
Hans-Christoph Steiner wrote:
>On May 30, 2008, at 3:17 PM, Damian Stewart wrote:
>
>>>why not do what a lot of other apps do and persistently store the
>>>last-used-directory somewhere in the config, so that next time I open
>>>Pd, Open is pointing to the same place as the last time I closed it?
>>
>>so no love for this idea then?
>
>That could work too. That would rely on the preferences system, right now
>it is not easy/clean to extend. So maybe that would come later.
>
It should be not too difficult (?) to have openpanel/savepanel save their
current path in the .pd file when the patch is saved.
It seems to involve registering a save function using class_setsavefn() to
replace the default text_save() with a panel_save() which would append the
path symbol to the "#X obj x y openpanel" binbuf for the object. Then in the
panel_new() routine the path will show up as an extra argument (I hope;) if
it is redeclared as openpanel_new(t_symbol *s, int argc, t_atom argv) and
adding a GIMME to the class_new() arguments.
Martin
More information about the Pd-list
mailing list