CLIM mail archive

[Prev][Next][Index][Thread]

Re: accept for pathnames



chyde@BBN.COM writes:
 > 
 > #+clim-2.0
 > 
 > wondering if anyone has modified the ACCEPT method for PATHNAME so
 > that it calls SELECT-FILE instead of expecting me to correctly type in
 > some lengthy string...

Almost what you want (you can augment the presentation type yourself):
(accept-values-command-button (stream) 
	       (format stream "~A" path)
	       ;;This is a Patch cuz :default doesn't work for Franz
	       (let ((path-dir (make-pathname :defaults path
					      :name nil :type nil)))
		 (when (probe-file path-dir)
		   (setf (working-directory) path-dir)))
	       (let ((new-path (select-file *application-frame* :default path)))
		 (when new-path
		   (setf path new-path))))

Dan

Follow-Ups:

Main Index | Thread Index