[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Worked in 1.2, now trap crashes.



   From: Todd.Kaufmann@NL.CS.CMU.EDU

   I'm trying to port some code that works under 1.2 to 1.3.2.

   The offending function is as follows:

   (defun invalidate-area (rect)
     (rlet ((var :rect))
       (copy-record rect :rect var)
       (_InvalRect :ptr var :novalue)))

   What's wrong with this, and why should it crash 1.3.2 ?

Whenever you call a Quickdraw trap, such as _InvalRect, you need to make sure
that you have a valid grafport installed.  You can do this with WITH-PORT or
(in 1.3.x) WITH-FOCUSED-VIEW.  If you call Quickdraw traps without any
valid grafport, you will most certainly crash.

  -andrew

p.s. can't help you with the fasl version question.