home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!news.udel.edu!chopin.udel.edu!kurisuto
- From: kurisuto@chopin.udel.edu (Sean J. Crist)
- Subject: List Manager calling LDEF when it shouldn't be
- Message-ID: <Bz4IGq.Jwu@news.udel.edu>
- Sender: usenet@news.udel.edu
- Nntp-Posting-Host: chopin.udel.edu
- Organization: University of Delaware
- Date: Sat, 12 Dec 1992 01:50:50 GMT
- Lines: 31
-
- Here's what I'm doing: I've written an LDEF for ICONs and gotten it work
- as it's supposed to. I'm making a list to select icons out of a resource
- file, as in HyperCard. I've managed to get things running fairly well.
-
- However, there's a problem. Most of the time, the number of available
- resources isn't evenly divisible by the number of columns; in other words,
- my last row will have some empty cells at the end of it. I want these
- cells to just be empty and unselectable. However, the List Manager calls
- my LDEF to draw these cells anyway, even though it knows full well I
- haven't put anything in them. In my case, my LDEF ends up drawing ICON 0
- in those cells, which is the 'stop' icon from the system file.
-
- My understanding of how the List Manager stores resource data is that it's
- all kept in one handle, and that the ListHandle ends with a table of
- offsets to the data in the handle. If I haven't put anything into these
- cells, then it seems that these cells wouldn't have offsets at all, and
- that the List manager would never call the LDEF to draw them.
-
- Of course, I could fix this up by telling my LDEF not to draw or hilight
- anything if the cell contains 0 (I don't want to display the system file
- icons anyway), but I really want to know why the List Manager is drawing
- these cells when I haven't stored any data in them. Does anybody know the
- reason/fix?
-
- Thank you.
-
- \/ __ __ _\_ Kurisuto (Sean Crist) | "The Pillsbury Doughboy
- --- | | \ / Department of Linguistics | is SATAN!"
- _| ,| ,| ----- University of Delaware | "Will you shut up,
- _| ,| ,| [_] kurisuto@chopin.udel.edu | already?"
- | | | [_] Discl: I speak for myself. |
-