Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uwm.edu!ogicse!unmvax!uokmax!d.cs.okstate.edu!norman From: norman@d.cs.okstate.edu (Norman Graham) Newsgroups: comp.sys.mac.programmer Subject: MacApp scrolling of indefinite sized views Keywords: MacApp TScroller Message-ID: <1991Apr2.233513.18137@d.cs.okstate.edu> Date: 2 Apr 91 23:35:13 GMT Sender: norman@d.cs.okstate.edu (Norman Graham) Organization: Oklahoma State University, Stillwater Lines: 26 I have a colleague that needs to provide a scrollable view for a special kind of container object. This container object is unique because it doesn't know how big it is or how many elements it contains, but it can return the element that is say 33% from the beginning of the container. (When asking for an element based on a percentage, the container can only take a guess which, in extreme circumstances, can be way off.) The container also has a notion of a current element and can get the previous, next, first, and last elements; so in theory you could count all the elements, but in practice that would take far too long. My colleague would like to create a subclass of TScroller that can scroll views of these container objects, but he can't find a class definition that cleanly describes what he needs. In short, his definition requires the scroller object to communicate directly with the container object. The view that sits on the scroller object also communicates with the container object (you would expect this). BTW, since the size of the container object is indefinite, the container view has to be either the same size as the scroller or the maximum possible view size. Would anyone care to enlighten us on how this should be done? -- Norman Graham Standard Disclaimer Applies {cbosgd,rutgers}!okstate!norman