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

Scrolling question



I was trying to create a table (3 columns, 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.

The other option I considered is having a separate scrollbar item that
scrolls all three columns.  However, I must not understand the role of the
scrollee.  I thought that the value that you pass as the scrollee to a
scrollbar was just used as the parameter to the scroll-bar-changed method.
However, it seems that there are some restrictions on what can be a
scrollee because when I try to pass a list of the three
sequence-dialog-items to the scrollbar as the scrollee I get an error.  Can
someone clarify any restrictions on the scrollee?

For example (very crude example):

(defun test-table ()
  (let*
    ((a-list '(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16))
     (win (make-instance 'window))
     (t1
      (make-instance 'sequence-dialog-item
        :table-sequence a-list
        :visible-dimensions #@(1 6)
        :view-container win
        :table-vscrollp '()))
     (t2
      (make-instance 'sequence-dialog-item
        :table-sequence a-list
        :visible-dimensions #@(1 6)
        :view-container win
        :table-vscrollp '()))
     (t3
      (make-instance 'sequence-dialog-item
        :table-sequence a-list
        :visible-dimensions #@(1 6)
        :view-container win
        :table-vscrollp '()))
     (sb
      (make-instance 'scroll-bar-dialog-item
        :direction :vertical
        :view-container win
        :scrollee `(,t1 ,t2 ,t3))))))

? (test-table)
> Error: No applicable method for args:
>         ((#<SEQUENCE-DIALOG-ITEM #xD99491> #<SEQUENCE-DIALOG-ITEM #xD995D9>
>#<SEQUENCE-DIALOG-ITEM #xD99741>) CCL::SCROLL-BARS)
>         to #<STANDARD-GENERIC-FUNCTION VIEW-GET #xD038C6>
> While executing: #<STANDARD-METHOD NO-APPLICABLE-METHOD (T)>
> Type Command-. to abort.
See the Restarts? menu item for further choices.
1 >

--Thanks.