Article View: comp.lang.lisp.mcl
Article #706update events from tight loops?
From: sharp
Date: Fri, 08 Jan 1993 03:04
Date: Fri, 08 Jan 1993 03:04
36 lines
1704 bytes
1704 bytes
Hiya,
I am creating a view item that increments or decrements a number when a
button is clicked. I would like the button (inc and dec) to behave such
that a click inc/decs by one, and holding the button continuously inc/decs
(at some rate).
I can get the behaviour, but the view does not update. The key part is the
looping structure below:
(defmethod view-click-event-handler ((self increment-button) where)
(declare (ignore where))
(let ((to-view (if (message-view self)
(message-view self)
(view-container self))))
(when to-view
(increment to-view)
(let ((start (rref *current-event* :EventRecord.when)))
;; key bit
(loop
(unless (mouse-down-p)
(return))
(when (= (mod (- (#_TickCount) start) 20))
(increment to-view)
(WHAT GOES HERE????)))))))))
The WHAT GOES HERE? is where I need something that will cause LISP to allow
invalidated views to update themselves.
Any suggestions?
maurice
-------------------------------------------------------------------------
Maurice Sharp I #include <std_disclaimer.c>
Apple Computer Inc. |"Work for?! I don't work *for* anybody.
Intern at Large | I'm just having fun." -- The Doctor (#4)
Technical Details
Message-ID:
<9301080301.AA26740@newton.apple.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!apple!cambridge.apple.com!sharp@newton.apple.comShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!apple!cambridge.apple.com!sharp@newton.apple.com From: sharp@newton.apple.com Newsgroups: comp.lang.lisp.mcl Subject: update events from tight loops? Message-ID: <9301080301.AA26740@newton.apple.com> Date: 8 Jan 93 03:04:22 GMT Sender: info-mcl-request@cambridge.apple.com Lines: 36 Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M