Article View: comp.lang.lisp.mcl
Article #597Re: Views and keystrokes
From: Bill St. Clair
Date: Thu, 31 Dec 1992 17:06
Date: Thu, 31 Dec 1992 17:06
31 lines
1936 bytes
1936 bytes
>> The only problem is that you need to define a dialog-item-enabled-p
>> method for your key handler class
>
>Bill,
> Thanks for the clue. I saw the error message complaining that no
>"dialog-item-enabled-p" was defined for my view class, but I assumed
>that I was on the wrong track, since I wasn't trying to define a
>dialog item. One last question. After implementing the patch I get
>most key strokes, but I can only get access to a #\Tab key if I hold
>down the shift-tab combination. Is this because the window now thinks
>that the view is a dialog item? Below is the code that prints out
>any keys that it gets:
(method view-key-event-handler (window t)) only passes tab & return
characters to the current-key-handler if it returns true for
allow-tabs-p & allow-returns-p respectively. The default is for the
tab character to switch to another key handler and the return character
to select a default button. The easiest way to make your key handler
get these characters is with the :allow-tabs & :alow-returns initargs
(to key-handler-mixin). You can also use the set-allow-tabs &
set-allow-returns functions.
(setf temp-wind
(make-instance 'special-window
:view-subviews
(list (setf temp-view
(make-instance 'special-view
:view-position #@(40 40)
:view-size #@(150 150)
:allow-tabs t
:allow-returns t)))))
Technical Details
Message-ID:
<9212311706.AA14955@cambridge.apple.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!sun-barr!ames!olivea!apple!cambridge.apple.com!bill@cambridge.apple.comShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!sun-barr!ames!olivea!apple!cambridge.apple.com!bill@cambridge.apple.com From: bill@cambridge.apple.com (Bill St. Clair) Newsgroups: comp.lang.lisp.mcl Subject: Re: Views and keystrokes Message-ID: <9212311706.AA14955@cambridge.apple.com> Date: 31 Dec 92 17:06:01 GMT Sender: info-mcl-request@cambridge.apple.com Lines: 31 Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M