Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!cs.utexas.edu!ut-emx!chrisj From: chrisj@ut-emx.UUCP (Chris Johnson) Newsgroups: comp.sys.mac Subject: Re: Resource file HELP Message-ID: <6156@ut-emx.UUCP> Date: 19 Sep 88 20:29:57 GMT References:<6153@ut-emx.UUCP> Reply-To: chrisj@emx.UUCP (Chris Johnson) Organization: U.T. Austin Computation Center Lines: 18 A brief note on the source I posted. The line: if (TextHand != noErr) { Should actually read: if (TextHand != NULL) { By coincidence, noErr and NULL both equal zero so the example works anyway, but it isn't really correct. With most resource manager calls you would check the global ResErr to see if the call completed properly, but there's a bug in GetResourse() that permits it to return in noErr even in cases where it was unable to get a resource, so with GetResource() it's best to check the handle it returns to see if it is equal to NULL or not. (If it is NULL, the call failed.) I was typing faster than I was thinking, sorry. ----Chris