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

cell-select on exist



;Asking a *sequence-dialog-item* to cell-select is useless during exist.
;As near as I can determine, the act of adding the *sequence-dialog-item*
;to a dialog causes all cells to be unselected.
;There may be a reason for this, but it seems like a bug to me, or at
;least an undesirable feature.
;The only work-arounds I can suggest right now are:
;  (eval-enqueue `(ask ,(self) (cell-select 0 0)))
;which works for me when it replaces the (cell-select 0 0).

;or calling
;   (cell-select 0 0)
;during (add-self-to-dialog)


;;;Sample code to demo the bug.  Note that the first sequence
;;;will NOT have A selected; the second will.

(defobject *sample* *sequence-dialog-item*)

(defobfun (exist *sample*) (init-list)
  (usual-exist init-list)
  (cell-select 0 0)           ;This will not work
)

(defparameter **sample** (oneof *sample* :table-sequence '(a b c)))
(defparameter **dialog1**
   (oneof *dialog*
     :window-position (make-point 0 *menubar-bottom*)
     :window-title "Sample1"
))
(defparameter **dialog2**
   (oneof *dialog*
     :window-position (make-point 300 *menubar-bottom*)
     :window-title "Sample2"
))

(ask **dialog1** (add-dialog-items **sample**))

(sleep 5)
(ask **dialog1** (remove-dialog-items **sample**))
(ask **dialog2** (add-dialog-items **sample**))
(ask **sample** (cell-select 0 0))              ;This will work.

"TANSTAAFL" Rich lynch@aristotle.ils.nwu.edu