Changeset 14220


Ignore:
Timestamp:
Aug 26, 2010, 8:55:59 AM (9 years ago)
Author:
arthur
Message:

Define choose-directory-dialog, remove fatally recursive EASYGUI::cocoa-choose-directory-dialog, make y-or-n-dialog accept key equivalents cmd-n and cmd-N

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/examples/cocoa/easygui/dialogs.lisp

    r12718 r14220  
    1515    (#/setMessageText: alert (ccl::%make-nsstring message))
    1616    (#/addButtonWithTitle: alert (ccl::%make-nsstring "Yes"))
    17     (#/addButtonWithTitle: alert (ccl::%make-nsstring "No"))
     17    (let ((no (#/addButtonWithTitle: alert (ccl::%make-nsstring "No"))))
     18          (#/setKeyEquivalent: no (ccl::%make-nsstring "N"))
     19          (#/setKeyEquivalent: no (ccl::%make-nsstring "n"))
     20          (#/setKeyEquivalentModifierMask: no #$NSCommandKeyMask))
    1821    (eql (#/runModal alert) #$NSAlertFirstButtonReturn)))
    1922
     
    2730  (gui::cocoa-choose-new-file-dialog :directory directory :file-types file-types :file file))
    2831
    29 (defun cocoa-choose-directory-dialog (&key directory button-string)
     32(defun choose-directory-dialog (&key directory button-string)
    3033  (declare (ignore button-string))
    31   (cocoa-choose-directory-dialog :directory directory))
     34  (gui::cocoa-choose-directory-dialog :directory directory))
    3235
    3336(objc:defmethod (#/NSWindowWillCloseNotification :void) ((self ns:ns-color-panel))
Note: See TracChangeset for help on using the changeset viewer.