<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I'm noticing that pd and the pd-gui seem to have different notions about the current directory:<div class=""><br class=""></div><div class="">* pd: when started on commandline, current path is the working directory when pd was started</div><div class="">* pd-gui: when started before pd, current path for panels is $::env(HOME) aka home directory ... even though *actual* current dir is pd bin folder</div><div class=""><br class=""></div><div class="">The problem I'm noticing is that pd-gui's "current path" is only reflected in [openpanel] & [savepanel] while the *actual* tcl current path is different. On macOS, starting Pd by double-clicking a patch sets the cwd to the parent folder of that patch, so relative start directories to a panel work as expected. Opening Pd and then opening the patch leads to different behavior as the actual current working directory is not the same as that of the patch. In this second example, there is also a disparity between what you see when baking an [openpanel] and what relative paths it might find since the displayed location is *different* from the actual location.</div><div class=""><br class=""></div><div class="">I see 5 possible solutions:</div><div class=""><br class=""></div><div class="">1. EASY: append any relative paths from [openpanel] / [savepanel] to the current panel directories ($::fileopendir / $::filenewdir)</div><div class=""><br class=""></div><div class="">2. EASY (but could lead unexpected behavior): change directory to the $::fileopendir on startup when the GUI is started first and without any specific location (aka opened a patch) </div><div class=""><br class=""></div><div class="">3. EASY (but not user friendly): do *not* set $::fileopendir / $::filenewdir to anything other than the tcl [pwd]</div><div class=""><br class=""></div><div class="">4. HARDER (but more user friendly): [openpanel] / [savepanel] could append relative paths to the current canvas path </div><div class=""><div class=""><br class=""></div><div class="">5. HARDER (but more generally useful): add the ability to query the canvas path in order to build proper fullpaths to give to [openpanel] / [savepanel]</div><div class=""><br class=""></div><div class="">Maybe the best solution is a mix of 2-3 of the above? In any case, I can implement 1-4 relatively easily. IMHO #4 is the better way to go, although it would mean using [openpanel] within an abstraction using the abstraction's parent directory with relative paths...</div><div class=""><br class=""></div><div class="">This probably also touches about path expectations when using [soundfiler] and [readsf~]...</div><div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">--------</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">Dan Wilcox</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><a href="http://twitter.com/danomatika" class="">@danomatika</a></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><a href="http://danomatika.com" class="">danomatika.com</a></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><a href="http://robotcowboy.com" class="">robotcowboy.com</a></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><br class="Apple-interchange-newline">
</div>

<br class=""></div></div></body></html>