home *** CD-ROM | disk | FTP | other *** search
- ; book pp.228-231
-
- (setf intercept (send toggle-item-proto :new "Intercept" :value t))
- (setf x-item-0 (send toggle-item-proto :new "X0"))
- (setf x-item-1 (send toggle-item-proto :new "X1"))
- (setf x-item-2 (send toggle-item-proto :new "X2"))
- (setf y-item (send choice-item-proto :new (list "Y0" "Y1" "Y2") :value 1))
- (setf x-label (send text-item-proto :new "X Variables"))
- (setf y-label (send text-item-proto :new "Y Variables"))
- (setf prompt (send text-item-proto :new "Name:"))
- (setf name (send edit-text-item-proto :new "" :text-length 15))
- (setf cancel (send modal-button-proto :new "Cancel"))
-
- (defun collect-values ()
- (list (send name :text)
- (send y-item :value)
- (which (list (send x-item-0 :value)
- (send x-item-1 :value)
- (send x-item-2 :value)))
- (send intercept :value)))
- (setf ok (send modal-button-proto :new "OK" :action #'collect-values))
-
- (setf reg-dialog
- (send modal-dialog-proto :new
- (list
- (list
- (list y-label y-item intercept)
- (list x-label x-item-0 x-item-1 x-item-2))
- (list prompt name)
- (list ok cancel))))
-
- (send reg-dialog :modal-dialog)
-