[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Useful but undocumented dialog feature?
- To: info-macl@cambridge.apple.com
- Subject: Useful but undocumented dialog feature?
- From: cornell@unix1.cs.umass.edu (Matthew Cornell)
- Date: Thu, 12 Jul 90 12:08:03 EDT
Hello. I need to know within a dialog's view-click-event-handler
whether an item was clicked or not. After some experimentation I found
the result of the clicked (actually, the _released_)
>dialog-item-action is returned by usual-view-click-event-handler or
nil if no item was clicked. Is this intentional? Can I depend on it in
the future? Did I miss the page documenting this in TFM? Thanks. The
following code snippet demonstrates this:
(defobject *dial* *dialog*)
(defobfun (view-click-event-handler *dial*) (point)
(format t "~&usual-view-click-event-handler result: ~s"
(usual-view-click-event-handler point)))
(oneof *dial* :dialog-items
(list (oneof *button-dialog-item* :dialog-item-text "Button1"
:dialog-item-action '(values :button1))
(oneof *button-dialog-item* :dialog-item-text "Button2"
:dialog-item-action '(values :button2))))
Matthew Cornell
==================================================
Knowledge Communication Systems Group
Department of Computer and Information Science
University of Massachusetts/Amherst, MA 01002
cornell@cs.umass.edu
(413) 256-6664[home] (413) 545-0639, -0582[office]
==================================================