Path: utzoo!utgpu!watmath!att!pacbell!ames!indri!uakari.primate.wisc.edu!csd4.milw.wisc.edu!cs.utexas.edu!usc!bloom-beacon!bu-cs!dartvax!eleazar.dartmouth.edu!isle
From: isle@eleazar.dartmouth.edu (Ken Hancock)
Newsgroups: comp.sys.mac.programmer
Subject: DA question
Message-ID: <14924@dartvax.Dartmouth.EDU>
Date: 9 Aug 89 00:20:03 GMT
Sender: news@dartvax.Dartmouth.EDU
Reply-To: isle@eleazar.dartmouth.edu (Ken Hancock)
Organization: Computer Resource Center, Dartmouth College
Lines: 30

I ran into an interesting problem the other day while
debugging a desk accessory.  The DA seemed to work fine,
except for when another DA was opened and became frontmost
and was then closed.  My DA almost always bombed immediately
after the other DA was closed.

What I found was that when my DA was shifted to the back,
the DRVR was unlocked, causing it to be relocated.  My
DA's main window is brought up with the Dialog Manager
and has a number of user items.  So, when the DRVR
was moved, all the pointers to update procs stored in
the user items' handles were invalidated.

Simple enough solution is to just reinitialize the
user items before any activate event.  What I found
hard to believe is that I couldn't find this unlocking
of the DRVR ANYWHERE -- it seemed to me a fairly common
problem and I was surprised that it wasn't in a Technote.

Someone please tell me that I just missed something and
that it is documented.  And if it's not, might DTS
want to document this in a technote somewhere???

Ken


Ken Hancock  '90                    | E-mail: (BITNET/UUCP/INTERNET)
Computer Resource Center Consultant |   isle@eleazar.dartmouth.edu
------------------------------------+---------------------------------------
DISCLAIMER?  I don't get paid enough to worry about disclaimers.