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

Re: changing cursor



        Reply to:   RE>changing cursor
> I am trying to change cursor to busy cursor such as watch.
> Can anyone help me how to do that?

Trying to set the cursor mmight prove poroblematic when you don't know that
"... the cursor is immidiately reset to some other shape by the event system's
background cursor handling." when you call something like (set-cursor
*watch-cursor*). You need to use one of MCL's build-in facilities to avoid
this.

example 1, using with-curosr

(with-cursor *watch-cursor*
    (let ((count 0))
      (dotimes (iterate 100000)(* count iterate))))

example 2, using without-interrupts

(without-interrupts
    (set-cursor *watch-cursor*)
    (let ((count 0))
      (dotimes (iterate 100000)(* count iterate))))

example 3, using *cursor-hook*

(progn
  (setf *cursorhook* *watch-cursor*)
  (let ((count 0))
    (dotimes (iterate 100000)(* count iterate)))
  (setf *cursorhook* #'ccl::cursorhook)
  )

Descriptions can be found in the manual of MCL, pages 213 - 215

Hope this helps you out,

Andre Koehorst,
Research Institute for Knowledge Systems
Maastricht, the Netherlands

andre@riks.nl