[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scrolling question
- To: email@example.com
- Subject: Re: Scrolling question
- From: "Mark A. Tapia" <firstname.lastname@example.org>
- Date: Mon, 14 Feb 1994 15:37:42 -0500
- Cc: email@example.com
On 14 Feb 1994, Rob Browning asks creating a scrolling array.
The table contains 3 cvolumns and n rows:
> I wanted to use a
> separate sequence-dialog-item for each column. This would allow me the
> greatest number of rows (b/c of the 8K list manager limit).
> Given this set up, what would be the best way to have one scroll bar that
> scrolls all three items? I thought about letting one of the
> sequence-dialog-items have a scroll bar and update the other two columns
> when the main one is scrolled.
Rob then mentions that he receives an error when he
tries to link three scroll columns.
Actually the problem occurs when there is one column:The other option I
considered is having a separate scrollbar item that
(defun test-table ()
((a-list '(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16))
(win (make-instance 'window))
:visible-dimensions #@(1 6)
> Error: No applicable method for args:
> ((#<SEQUENCE-DIALOG-ITEM #x311991>) CCL::SCROLL-BARS)
> to #<STANDARD-GENERIC-FUNCTION VIEW-GET #x1F4926>
> While executing: #<STANDARD-METHOD NO-APPLICABLE-METHOD (T)>
> Type Command-. to abort.
See the RestartsI menu item for further choices.
The array dialog item (array-dialog-item.lisp in the example folder)
handles 2-d arrays the way you want. I'm not sure about
the upper limit but it does handle 2400 elements.
Here's an example.
First load from the examples folder the file array-dialog-item.lisp
or compile the file and then load the fasl file. Now execute the
following. Scrolling by a page is slow!
(defun make-test-array (&rest dimensions)
(let* ((a (make-array dimensions))
(dims (make-list (length dimensions) :initial-element 0)))
(setf (apply #'aref a dims) (copy-list dims))
(do ((ds dims (cdr ds))
(lims dimensions (cdr lims)))
((null ds) (return-from make-test-array a))
(if (>= (incf (car ds)) (car lims))
(setf (car ds) 0)
(defun array-dialog-item-example (&rest dimensions)
(let* ((a (apply #'make-test-array dimensions))
(w (make-instance 'window :view-size #@(400 300))))
(time (array-dialog-item-example 3 800))
Initializing the 2400 element array takes a very long time on a IIcx running
(ARRAY-DIALOG-ITEM-EXAMPLE 3 800) took 14076 milliseconds (14.076 seconds) to
Of that, 100 milliseconds (0.100 seconds) were spent in The
Cooperative Multitasking Experience.
88400 bytes of memory allocated.