<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, and thank you all for helping so much with my questions. <div>here's another:</div><div>based on the function choose-directory-dialog in the GUI package I have done another function adding some title strings, one for the panel one for the button.</div><div>Now I would like to add the functionality that the panel opens in a default directory choosen by me.</div><div>How do I do that?</div><div><br></div><div>Sincerely</div><div><br></div><div>Joakim</div><div><div apple-content-edited="true"> <div><font class="Apple-style-span" color="#595959" face="'Trebuchet MS'"><br></font></div><div><font class="Apple-style-span" color="#595959" face="'Trebuchet MS'"><br></font></div><div><font class="Apple-style-span" color="#595959" face="'Trebuchet MS'"><div>(defun choose-directory-dialog ()</div><div> (execute-in-gui #'(lambda ()</div><div> (let ((op (#/openPanel ns:ns-open-panel)))</div><div> (#/setAllowsMultipleSelection: op nil)</div><div> (#/setCanChooseDirectories: op t)</div><div> (#/setCanChooseFiles: op nil)</div><div> (when (eql (#/runModalForTypes: op +null-ptr+) #$NSOKButton)</div><div> ;; #/stringByStandardizingPath seems to strip trailing slashes</div><div> (let* ((path (#/retain (#/stringByAppendingString:</div><div> (#/stringByStandardizingPath</div><div> (#/objectAtIndex: (#/filenames op) 0))</div><div> #@"/"))))</div><div> path))))))</div><div><br></div><div><div>(defmethod choose-directory-dialog-with-strings ((dialogtitle string) (buttonstring string))</div><div> (gui::lisp-string-from-nsstring</div><div> (gui::execute-in-gui #'(lambda ()</div><div> (let ((op (#/openPanel ns:ns-open-panel)))</div><div> (#/setAllowsMultipleSelection: op nil)</div><div> (#/setCanChooseDirectories: op t)</div><div> (#/setCanChooseFiles: op nil)</div><div> (#/setPrompt: op (ccl::%make-nsstring buttonstring))</div><div> (#/setTitle: op (ccl::%make-nsstring dialogtitle))</div><div> (when (eql (#/runModalForTypes: op +null-ptr+) #$NSOKButton)</div><div> ;; #/stringByStandardizingPath seems to strip trailing slashes</div><div> (let* ((path (#/retain (#/stringByAppendingString:</div><div> (#/stringByStandardizingPath</div><div> (#/objectAtIndex: (#/filenames op) 0))</div><div> #@"/"))))</div><div> path)))))))</div></div><br></font></div><div><font class="Apple-style-span" color="#595959" face="'Trebuchet MS'"><br></font></div><div><font class="Apple-style-span" face="'Trebuchet MS'" color="#595959">Joakim Sandgren</font></div><div><font class="Apple-style-span" face="'Trebuchet MS'" color="#595959">joakim sandgren musik</font></div><div><font class="Apple-style-span" face="'Trebuchet MS'" color="#595959">42, rue de Maubeuge</font></div><div><font class="Apple-style-span" face="'Trebuchet MS'" color="#595959">75009 Paris</font></div><div><font class="Apple-style-span" face="'Trebuchet MS'" color="#595959">France</font></div><div><font class="Apple-style-span" face="'Trebuchet MS'" color="#595959">+33 (0)1 45 26 43 90</font></div><div><font class="Apple-style-span" face="'Trebuchet MS'" color="#595959"><a href="mailto:info@joakimsandgren.com">info@joakimsandgren.com</a></font></div><div><font class="Apple-style-span" face="'Trebuchet MS'" color="#595959"><a href="http://www.joakimsandgren.com/">http://www.joakimsandgren.com</a></font></div> </div><br></div></body></html>