[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
forcing display output of dialog items
- To: info-macl@cambridge.apple.com
- Subject: forcing display output of dialog items
- From: Brigham Bell <bell@boulder.Colorado.EDU>
- Date: Thu, 11 Oct 90 19:49:57 MDT
I'm writing a program in which the position and the contents of
various dialog items are modified during the execution of an
operation. The application requires that the modifications should be
visible to the user during the execution of the operation. In the
following example the "animate" button should move the "blee" text
item across a window. How can I "force output" of the display "blee"
text and the table sequence during the execution of the animate-test
function.
(defun make-testw ()
(declare (object-variable my-dialog))
(oneof *dialog* :dialog-items
(list (oneof *static-text-dialog-item*
:dialog-item-text "blee"
:dialog-item-position #@(10 0))
(oneof *sequence-dialog-item*
:dialog-item-position #@(100 30)
:dialog-item-size #@(120 150)
:table-hscrollp nil)
(oneof *button-dialog-item*
:dialog-item-text "animate"
:dialog-item-position #@(100 5)
:dialog-item-action
(nfunction *button-dialog-item*
(lambda () (animate-test my-dialog)))))))
(defun animate-test (d)
(let* ((ditems (ask d (dialog-items)))
(stdi (first ditems))
(sdi (second ditems)))
(dotimes (i 20)
(ask stdi (set-dialog-item-position
(add-points (dialog-item-position) #@(0 1))))
(ask sdi (set-table-sequence (nconc (table-sequence) (list i)))))))
Other information:
I'm using MACL 1.3.2.
If the *static-text-dialog-item* is a *button-dialog-item* in the
example, the animation will move this button appropriately. The
scroll bar in the sequence dialog item moves appropriately during the
animation, but the dialog items aren't displayed until afterwards.
I have run across this problem in 2 different applications:
1. a graphic simulation program in which a trace of the simulation is
displayed as the simulation is executing. (the trace is displayed
within a sequence dialog item.)
2. an extension to the aid dialog interface designer that allows the
designer to specify constraints through spreadsheet machinery. If an
item is dragged in aid, the display of any item that is dependent on
its position will not be updated until the item is set down.
Thanks in advance for any help on forcing display output.
Brigham Bell (bell@boulder.colorado.edu)