Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 UW 5/3/83; site uw-beaver
Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!houxm!vax135!cornell!uw-beaver!info-mac
From: info-mac@uw-beaver (info-mac)
Newsgroups: fa.info-mac
Subject: Update Events
Message-ID:
Date: Thu, 1-Nov-84 16:44:36 EDT
Article-I.D.: uw-beave.2034
Posted: Thu Nov 1 16:44:36 1984
Date-Received: Fri, 26-Oct-84 09:41:48 EDT
Sender: daemon@uw-beave
Organization: U of Washington Computer Science
Lines: 31
From: Robert.White@CMU-CS-GANDALF
For those who have not yet discovered this "feature". I will explain in
Pascal, but the same is true if you are using the SumMacC stuff. If you
have multiple windows and you are processing an UpdateEVT you normally
would have code like this:
beginupdate (ThePTR);
{update code}
endupdate (ThePTR);
Unfortunately, some updates (like TEUpdate) get updated through the
current port, and not "ThePTR". You would think that "beginupdate"
and "endupdate" would take care of retaining port references. It
does not. You would think that TEUpdate would use the "InPort" field,
it does not. You should write your code like this:
getport (WasPort);
setport (ThePTR);
beginupdate (ThePTR);
{update code, including TEUpdate if needed}
endupdate (ThePTR);
setport (WasPort);
I hope this helps you. I have told the Mac Support People at Apple and
they thanked me and said they would pass the information to the document
people. I guess this means they will treat it as a feature and make
the documentation clear as to what happens instead of also making the
fixes in new ROM generations.
Robert White
[email protected]
