home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mac / programm / 13956 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  2.1 KB

  1. Path: sparky!uunet!haven.umd.edu!mimsy!lhc!mcmathmac.nlm.nih.gov!user
  2. From: mcmath@csb1.nlm.nih.gov (Chuck McMath)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: My view resource won't load.  Any suggestions?
  5. Message-ID: <mcmath-130892140547@mcmathmac.nlm.nih.gov>
  6. Date: 13 Aug 92 18:11:00 GMT
  7. References: <james.713664246@syzygy>
  8. Sender: usenet@nlm.nih.gov (usenet news poster)
  9. Followup-To: comp.sys.mac.programmer
  10. Organization: MSD
  11. Lines: 34
  12.  
  13. In article <james.713664246@syzygy>, james@socs.uts.edu.au (James Ward)
  14. wrote:
  15. > Please help a newbie MacApp`er with a view resource problem...
  16. > I`m trying to make my MacApp 3.0 application display a view with around
  17. > nine buttons, three clusters and a static text list.  My code compiles
  18. > OK, but when it is run no document or window is created, and the 
  19. > message "Not enough memory to create document" appears.  SourceBug shows 
  20. > that the NewTemplateWindow function returns 'nil'.
  21. Well, it's probably NOT really an out of memory error, as you noticed when
  22. nothing changed after you upped the partition size.  What's happening is
  23. that inside your view, when NewTemplateWindow is trying to create it,
  24. something is going wrong, and it's returning NIL instead of your root view.
  25.  
  26. I get this all the time when I try to use TPictureViews and the associated
  27. PICT resource is not found - that's the kind of error which causes your
  28. view to not get created.  With buttons, clusters and static text items, the
  29. only thing I can think of that might be the cause would be if your
  30. associated STR#'s weren't found (you know, the labels for the buttons,
  31. clusters, etc), or maybe a style wasn't found?
  32.  
  33. The way I track down such errors is to use SourceBug to trace into the
  34. NewTemplateWindow call deep enough until I can tell what can't be created. 
  35. It's grungy, but necessary.
  36.  
  37. chuck
  38.  
  39.  
  40. |- chuck mcmath - mcmath@csb1.nlm.nih.gov - MSD, Inc. ------------|
  41. |- National Library of Medicine - National Institutes of Health --|
  42. |- Bethesda, MD 20894 -  !aixelsyd evah uoy siht daer nac uoy fI -|
  43. |- "Hey batter, hey batter, hey batter, swing" - Anon. -----------|
  44.