[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
the enter key in apps
- To: Info-MCL@cambridge.apple.com
- Subject: the enter key in apps
- From: lau@pgate.darpa.mil
- Date: Wed, 5 Feb 92 19:59:00 EST
- Cc: lau@pgate.darpa.mil
I've released a financial budgeting application using MCL, and I
needed to disable the ed-eval-or-compile-current-sexp which executes
when the enter key is pressed and the current window has an editable-text
dialog item. I've been able to do this successfully using
(defun disable-enter-key-eval-for-fixed-windows ()
"Disables the enter key eval expression function for all windows loaded
by ift::fix-window function."
(declare (special *ift-windows-list*))
(dolist (win ift::*ift-windows-list*)
(format t "~%Disabling ent key eval of window[~A]" win)
(defmethod ed-eval-or-compile-current-sexp
((win window)) ) )
)
(disable-enter-key-eval-for-fixed-windows)
where *ift-windows-list* is a list of all my application's windows.
To avoid re-training data entry personnel who use the enter key to tab to the
next field, I tried the following code to make the enter key tab to the next
field:
(defun make-enter-key-eval-tab-for-fixed-windows ()
"Makes the enter key eval expression function just tab to next editable
field for all windows loaded by ift::fix-window function."
(declare (special *ift-windows-list*))
(dolist (win ift::*ift-windows-list*)
(format t "~%Making enter key tab for window[~A]" win)
(defmethod ed-eval-or-compile-current-sexp ((win window))
(format t "~%In make-enter-key-eval-tab-for-fixed-windows for ~%[~A]" win)
(change-key-handler win) ) )
)
(make-enter-key-eval-tab-for-fixed-windows)
This did no more than the first function above. Is there some simple way to
get the enter key to tab to the next editable field? Has anybody run into this
problem too?
Lawrence Au
DARPA