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

Cheesy Hacks #1 (update)

Here's an update of Cheesy Hacks #1: Better Search Files.

;;; better search files.lisp
;;; Cheesy Hacks #1 (2/4/94)
;;; Adds a "pick path" button to the standard MCL "search files" dialog box,
;;;  so you can use the standard file dialog box to pick a path.
;;; Load this file at startup time after MCL's menus have been built.

;;; 11/11/93 Shannon Spires
;;; 2/9/94   Christopher Vogt modified to not barf when initial string in
;;;          search files dialog was wild.
;;; Use at your own risk.

Date: Wed, 9 Feb 1994 10:48:25 -0800
To: svspire@somnet.sandia.gov
Subject: Re: Cheesy Hacks #1: Better Search Files
Organization: Kalantha, Inc.
Thanks for the hack. Below is my modified version that hacks around
the problem with the initial directory string, as well as others like
Christopher J. Vogt vogt@netcom.com
From: El Eh, CA

(defun new-search-file-dialog ()
    #@(312 10) #@(76 16)
    "Pick Path"
    #'(LAMBDA (ITEM)
        (let* ((pathitem (FIND-NAMED-SIBLING ITEM 'CCL::FILE-ITEM))
               (path (dialog-item-text pathitem)))
             :directory (if (wild-pathname-p path)
    ;; Use this format to search all subdirectories as well: "**:*.lisp"

 (find-menu-item (find-menu "Tools") "Search Files")

;;; End of Cheesy Hacks #1