Open GoogleCodeExporter opened 9 years ago
Suggest that in user-pick-color we bypass the timer
(defun user-pick-color (&key (color *black-color*)
(prompt "Pick a color")
(position (default-pick-color-position)))
"lets the user choose a color with the standard mac window"
;; timer usually works but not always when the pop-up-menu is clicked
;; doesn't work when mouse down
(progn
(with-cursor *arrow-cursor*
(if *color-available*
(with-port %temp-port% ; << added this - serendipitous guess
(setq *interrupt-level* 0) ;; why does with port do without-interrupts??
(with-rgb (rgb color)
(with-pstrs ((pp prompt))
(if (if t ; (osx-p)
(progn
(if nil ;*timer-interval*
(progn
(warn "The timer probaly won't work here")
(with-timer (#_GetColor position pp rgb rgb)))
(#_GetColor position pp rgb rgb)))
(#_getcolor position pp rgb rgb)) ;; timer makes a mess on OS9
(rgb-to-color rgb)
(throw-cancel)))))
(if (y-or-n-dialog prompt
:yes-text "Black"
:no-text "White")
*black-color*
*white-color*)))))
Original comment by p2.edoc@gmail.com
on 22 Jun 2010 at 6:01
Original issue reported on code.google.com by
p2.edoc@gmail.com
on 20 Jun 2010 at 8:44