home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / programm / 14838 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  2.0 KB

  1. Path: sparky!uunet!olivea!hal.com!decwrl!sdd.hp.com!cs.utexas.edu!oakhill!jolt.sps.mot.com!user
  2. From: Jim_Holt@aprdlgtr.sps.mot.com (Jim Holt)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: GWorlds with B&W Macs
  5. Message-ID: <Jim_Holt-010992093710@jolt.sps.mot.com>
  6. Date: 1 Sep 92 14:44:44 GMT
  7. Sender: news@oakhill.sps.mot.com
  8. Followup-To: comp.sys.mac.programmer
  9. Organization: Motorola
  10. Lines: 54
  11. Nntp-Posting-Host: 222.20.248.206
  12.  
  13. I read in Inside Mac volume 6 that under system 7.0 GWorlds were available
  14. on Black & White Macs.  However, I have been unsuccessful with getting them
  15. to work on my Mac Plus with System 7.0 and Tuner 1.1.1 .  The following
  16. code frag works fine under black & white on my MacIIci but goes to never
  17. land on the Plus.  
  18.  
  19. Has anyone gotten GWorlds to work on a Mac Plus ?
  20.  
  21. /*-------------------------------*/
  22.  
  23. PicHandle     tempPic;
  24. GrafPtr       savePort;
  25. GDHandle      saveGD;
  26. QDErr            err;
  27. GWorldPtr     tempGWorld;
  28. Rect       tempRect;
  29.  
  30.     /** Save info about current GWorld **/
  31.  
  32.     GetGWorld (&savePort, &saveGD);
  33.  
  34.     /** Read a Pict resource in and set up a GWorld**/
  35.     
  36.     tempPic = GetPicture(SOME_PICT_ID);
  37.     
  38.     if (tempPic)
  39.     {        
  40.         tempRect = (*tempPic)->picFrame;
  41.         
  42.         /** Make an offscreen GWorld **/
  43.  
  44.         err = NewGWorld (&tempGWorld, 0, &tempRect, nil, nil, 0);
  45.         if (err) return(err);
  46.         SetGWorld (tempGWorld, nil);
  47.  
  48.   /********* program goes away on the following call !! ************/
  49.  
  50.         DrawPicture(tempPic,&tempRect);
  51.         ReleaseResource((Handle) tempPic);
  52.     }
  53.     else return(PICT_NOT_FOUND_ERR);
  54.  
  55. /* rest of code deleted */
  56.  
  57.  
  58.  
  59. Any help would be very appreciated !  
  60.  
  61. +-------------------------------------------------------------------------+
  62. |   I used to have a catchy signature, but I forgot what it was ...       |
  63. |                                                                         |
  64. |   Jim Holt                                                              |
  65. |   Motorola, Inc    Jim_Holt@aprdlgtr.sps.mot.com                        |
  66. +-------------------------------------------------------------------------+
  67.