home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!usc!cs.utexas.edu!sun-barr!olivea!apple!goofy!cambridge.apple.com!gwer1@cislabs.pitt.edu
- From: gwer1@cislabs.pitt.edu (Gerhard Werner)
- Newsgroups: comp.lang.lisp.mcl
- Subject: <stdin>
- Message-ID: <9301101633.AA11340@phantom.cislabs.pitt.edu>
- Date: 10 Jan 93 16:33:03 GMT
- Sender: info-mcl-request@cambridge.apple.com
- Lines: 153
- Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
-
- I am hopelessly stuck: the purpose of the following abbreviated code is to use
-
- the list (items) and build from it a dialog consisting of buttons,
-
- check-boxes etc. I am building the list *show-list* for use by
-
- :view-subviews. I encounter a hopeless tangle of interactions
-
- among and between buttons and boxes. The static text items are
-
- work well.
-
- What are the errors of my way ? Please adevise.
-
-
-
- (defun init-all-items (items)
-
-
- (declare (list items))
-
-
- (setf *show-list* '())
-
-
- (dolist (item items)
-
-
- (let ((display-item (first item))
-
-
- (left-x (second item))
-
- (skipping rest)))
-
-
- (declare (atom sym left-x left-y right-x right-y) (string dialog-text))
-
-
- (cond ((equal display-item :radio)
-
-
- (setf *show-list* (append *show-list* (list
-
-
- (make-dialog-item 'radio-button-dialog-item
-
-
- (make-point left-x left-y)
-
-
- (make-point right-x right-y)
-
-
- dialog-text
-
-
- #'(lambda (item)
-
-
- item
-
-
- (set-display-hash sym))
-
-
- :view-font '("Monaco" 12 :plain)
-
-
- :radio-button-cluster 1
-
-
- )))))
-
-
- ((equal display-item :check)
-
-
- (setf *show-list* (append *show-list* (list
-
-
- (make-dialog-item 'check-box-dialog-item
-
-
- (make-point left-x left-y)
-
-
- (make-point right-x right-y)
-
-
- dialog-text
-
-
- #'(lambda (item)
-
-
- item
-
-
- (set-display-hash sym))
-
-
- :view-font '("Monaco" 9 :bold)
-
-
- )))))
-
-
- (t nil))))
-
-
-
-
- (make-instance 'dialog
-
-
- :window-type :document
-
-
- :window-title "Test Dialog"
-
-
- :view-position #@(20 40)
-
-
- :view-size #@(200 300)
-
-
- :view-subviews *show-list*)
-
-
- )
-
-
-
-
- (setf items
-
-
-
- T( (:radio 10 110 150 120 "Dysarthria" :dysarthric)
-
-
- (:radio 10 130 150 150 "Acute Onset" :course-acute)
-
-
- (:check 10 100 120 80 "Married" :status-married)
-
-
- (:check 10 80 120 80 "Unemployed" :status-unemployed)
-
-
- ))
-