Lisp HUG Maillist Archive

Re: Detecting mouse entry/exit... again




Le 14/04/09 22:05, « [NOM] » <[ADRESSE]> a écrit :

> (defun destroy-timer ()
>   (when *timer* ; Occasional error without this test!
>     (mp:unschedule-timer *timer*))
>   (setf *timer* nil))

Isn't it better like this ? In this way, you can keep your timer and just
reschedule it :

(defun stop-timer ()
  (unless (mp:timer-expired-p *timer*)
    (mp:unschedule-timer *timer*)))

Best

Denis


-------------------------------------------------------
Denis Pousseur
70 rue de Wansijn
1180 Bruxelles, Belgique

Tel : 32 (0)2 219 31 09
Mail :  denis.pousseur@gmail.com
-------------------------------------------------------



Re: Detecting mouse entry/exit... again

Denis Pousseur <denis.pousseur <at> gmail.com> writes:

> 
> Isn't it better like this ? In this way, you can keep your timer and just
> reschedule it :
> 
> (defun stop-timer ()
>   (unless (mp:timer-expired-p *timer*)
>     (mp:unschedule-timer *timer*)))
> 
> Best
> 
> Denis
> 

Thanks Denis... Actually I tried that already and it still errors :(

C


Updated at: 2020-12-10 08:41 UTC