Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!uokmax!d.cs.okstate.edu!norman From: norman@d.cs.okstate.edu (Norman Graham) Newsgroups: comp.sys.mac.programmer Subject: Re: MacApp scrolling of indefinite sized views Message-ID: <1991Apr3.162642.1427@d.cs.okstate.edu> Date: 3 Apr 91 16:26:42 GMT References: <1991Apr3.061733.18937@ux1.cso.uiuc.edu> Organization: Oklahoma State University Lines: 36 From article <1991Apr3.061733.18937@ux1.cso.uiuc.edu>, by ml27192@uxa.cso.uiuc.edu (Mark Lanett): > 1) it seems that if the view can deal with things properly, scrolling should > work automatically. How do you draw your view when you get an area? If you > just have have an arbitrarily sized view, then you interpolate the area > received to determine your percentages, and draw items starting from there. It > seems nasty, though, since scrolling could cause one item to be listed twice, > or not at all, depending on how sensitive your "guessing" is. No, the guessing may not be good enough to display an area based on an update rectangle. The container class is just too dumb: I just can't understand why the original designers didn't think about counting the elements when they built the data structures. :-( > 2) If you must, connecting the TScroller to the container isn't that bad. This > makes things easy since when you get a scroll down you know to just increment > and go draw the "next" element--no saying "where am I". In this case the > scroller tells the view exactly what to draw rather than sending an update. Yes, this is the current scheme: The scroller object doesn't invalidate a rectangle on the container view; it just asks the container view to draw the next/previous element or to draw several elements based on the current thumb position. > 3) Must you display the list directly or could you pull sublists out based > on some criteria and display them? The sublists must be displayed directly: There's no opportunity to create a new container object that knows it's number of elements. Thanks for the comments. Norm -- Norman Graham Standard Disclaimer Applies {cbosgd,rutgers}!okstate!norman