Path: utzoo!attcan!utgpu!watmath!att!dptg!rutgers!cs.utexas.edu!uunet!sco!jamesm From: jamesm@sco.COM (James M. Moore) Newsgroups: comp.sys.mac.programmer Subject: List manager and Think C Message-ID: <5501@viscous.sco.COM> Date: 30 Aug 89 15:55:26 GMT Sender: news@sco.COM Reply-To: jamesm@sco.COM (James M. Moore) Organization: An tOibriu Santa Cruz Lines: 38 One question about lists, one comment about the Think object libraries: 1. Is there any way to change the location of a list? There doesn't seem to be a list manager call to do so. The kludge that I tried that didn't work was to directly modify (**listHandle).rView, and then InvalRect the entire list. If this isn't possible, how do you clone a list? It seems like you could just build a new list that's the same size as the old, then just set (**newListHandle).cells to point to the old list's data. The first problem I see with that is that when you delete the old list, it expects to be able to delete its data. I guess you could set the cells handle to a dummy handle that it could then delete, but this seems to be moving from the realm of 'hack' into that of 'kludge.' Anyone have a more elegant way to do this? 2. The reason the list question comes up is that I'm building a list class as a subclass of CPane, and I'd like to implement Offset(). My class is practically done, but I spent a considerable amount of time working around having the origin reset every time I went into a drawing routine. This morning, I realized that I would probably have been better off if I had started out with a CControl superclass, as I wouldn't have to deal with any of the Prepare() stuff that CPane does for you. Think 4.0 is great fun, even though it doesn't have many of C++'s features (what I really want are virtual functions*, although everything else would be nice). *virtual functions: I understand this to mean that you can have a single function defined multiple times: foo(int x); foo(long x); and the function that gets called depends on the arguements that you pass. Feel free to correct me if I'm getting the terminology wrong. -- James Moore | You will face many tests in life. Santa Cruz Operation UNIX Tech Support | jamesm@sco.com | This is not one of them.