CLIM mail archive

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

Re: accept for pathnames



    Date: Wed, 3 Nov 1993 09:22 EST
    From: Daniel Cerys <cerys@BBN.COM>

    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

You could also try writing a new ACCEPT method for PATHNAME on a new
view class (the "SELECT-FILE" view).

References:

Main Index | Thread Index