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


Arie -
  thanks for the bug report.  Here's the code user-pick-color, extended
to accept a position argument (actually, all the args have been turned
into keyword args).


(defun user-pick-color (&key (color *black-color*) 
                             (prompt "Pick a color")
                             (position #@(40 100)))
  "lets the user choose a color with the standard mac window"
  (with-cursor *arrow-cursor*
    (if *color-available*
        (with-rgb (rgb color)
          (with-pstrs ((pp prompt))
            (if (logbitp 8 (_GetColor :long position
                                      :ptr pp
                                      :ptr rgb
                                      :ptr rgb
                (rgb-to-color rgb)
        (if (y-or-n-dialog prompt
                           :yes-text "Black"
                           :no-text "White")