home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / lisp / mcl / 2078 < prev    next >
Encoding:
Text File  |  1993-01-23  |  1.8 KB  |  47 lines

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!agate!apple!goofy!cambridge.apple.com!ctcmac!Mark_Carlotto@brazil.cambridge.apple.com
  2. From: Mark_Carlotto@b1mac144.read.tasc.com (Mark Carlotto)
  3. Newsgroups: comp.lang.lisp.mcl
  4. Subject: Stack Overflow Error
  5. Message-ID: <52-890-00070.2810556010.7464@ctcmac.read.tasc.com>
  6. Date: 21 Jan 93 20:48:27 GMT
  7. Sender: owner-info-mcl@cambridge.apple.com
  8. Lines: 36
  9. Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
  10.  
  11.  
  12.                        Subject:                               Time:3:38 PM
  13.   OFFICE MEMO          Stack Overflow Error                   Date:1/21/93
  14. Hi,
  15. I am using the following code to display images stored as PICT resources. By
  16. increasing 
  17. the size of the rectangle, I'm able to effectively roam and zoom the image. My
  18. problem
  19. is that if I make the rectangle too large (i.e., I attempt to zoom the image
  20. too much),
  21. the system crashes (type 28 stack overflow error). Any suggestions/fixes?
  22.  
  23. P.S. The same thing happens when I use your code for displaying PICT images. 
  24.  
  25. P.P.S I have tried to increase the sizes of the stack and heap using
  26. make-application
  27. without success.
  28.  
  29. (defun DISPLAY-IMAGE-RESOURCE (the-window rfile-name-string   pict-num 
  30.                                           left top right bottom)
  31.   (let (string-ptr resrefnum pict-handle)
  32.     (setf string-ptr (#_newptr 256))
  33.     (%put-string string-ptr rfile-name-string 0)
  34.     (setf resrefnum (#_openresfile string-ptr))
  35.     (rlet ((r :rect
  36.               :topleft (make-point left top)
  37.               :bottomright (make-point right bottom)))
  38.       (with-focused-view the-window
  39.         (window-select the-window)
  40.         (#_framerect r)
  41.         (setf pict-handle (#_getpicture pict-num))
  42.         (#_drawpicture pict-handle r)
  43.         (#_closeresfile resrefnum))))
  44.   t)
  45.  
  46. *******************
  47.