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