[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Set-view-scroll-position & set-view-position
- To: info-mcl@ministry.cambridge.apple.com
- Subject: Set-view-scroll-position & set-view-position
- From: poeck@informatik.uni-wuerzburg.de (Karsten Poeck)
- Date: 15 Nov 1993 16:23:01 GMT
- Followup-to: comp.lang.lisp.mcl
- Newsgroups: comp.lang.lisp.mcl
- Organization: University of Wuerzburg
#|
Mcl 2.01 Quadra 700
I have some troubles with the redrawing when I move dialog-items in
a view and call set-view-scroll-position afterwards. This can be best
demonstrated
by the follwing code. First call (create-window), wait and then call
(create-bug #@(0 20)) both in the listener. The effekt is that Text 2 is
shown
both at the old and the new-position in the window. I assume that
set-view-position tries to erase the old text2
view, but this is effectly executed after the scrolling is done.
Any clues? I tried some permutations of without-interrupts invalidate-view
and so on but had no luck
It must be a timing problem since
(progn
(create-window)
(create-bug #@(0 20))
)
works fine.
|#
(proclaim '(special window scroller text1 text2))
(defun create-window ()
(setq window
(make-instance 'window
:view-size (make-point 120 120)
:view-subviews
(list
(setq scroller
(make-instance 'view ;ccl::scroller
:view-size (make-point 100 100)
:view-subviews
(list
(setq text1
(make-instance 'static-text-dialog-item
:dialog-item-text "Text 1"
:view-position (make-point 10 40)))
(setq text2
(make-instance 'static-text-dialog-item
:dialog-item-text "Text 2"
:view-position (make-point 10 60)))))))))
)
(defun create-bug (position)
(set-view-position text2 (make-point 10 80))
(set-view-scroll-position scroller position)
)
#|
(create-window)
(create-bug #@(0 20))
(progn
(create-window)
(create-bug #@(0 20))
)
|#