[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

with-cursor



I've been having problems with the with-cursor macro. I unfortunately
cannot reproduce them without including quite a bit of code. Everytime I
try to build a simple example the code works. Here's the setup:

(defmethod view-draw-contents ((w my-window))
  (with-cursor *watch-cursor*
     ...blah...))

After the with-cursor form exits, the cursor is not setback. I just
added a call to update-cursor after the with-cursor form, i.e.

(defmethod view-draw-contents ((w my-window))
  (with-cursor *watch-cursor*
     ...blah...)
  (update-cursor))

And it works fine. A litte inspection shows that
(with-cursor *watch-cursor* body)
macro-expands to 
(let ((*cursorhook* *watch-cursor*)) (update-cursor) body)
not something like:
(progn (let ((*cursorhook* *watch-cursor*)) 
         (update-cursor) body)
       (update-cursor))

My main question is how does this work ever? What triggers resetting the
cursor in the cases where it is reset?

Thanks,
Robby
__________________________________________________________________________
Robby Findler                                               robby+@cmu.edu
Carnegie Mellon University    Pittsburgh, PA                (412) 681-4552