home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / mac / programm / 19703 < prev    next >
Encoding:
Text File  |  1992-12-11  |  2.1 KB  |  43 lines

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