Path: utzoo!mnetor!uunet!husc6!mailrus!nrl-cmf!ames!pasteur!ucbvax!decwrl!labrea!polya!rothberg
From: rothberg@polya.STANFORD.EDU (Edward Rothberg)
Newsgroups: comp.sys.mac.programmer
Subject: What can you assume about the current port?
Message-ID: <2799@polya.STANFORD.EDU>
Date: 10 May 88 21:07:58 GMT
Organization: Stanford University
Lines: 19


Here's something I can't find documented anywhere.  I have an application, and
in it I assume that a certain port is the 'default'.  Whenever I change ports,
I always change back to this one after I'm done.  If I want to draw into this
port, I just go ahead and do it.  My question is: is this a safe thing to
assume?  I had thought so until I tried the alarm clock DA.  It changes the
current port to it's own port, and doesn't restore the old one.  I see three
possibilities:

1) What I'm doing is totally bogus, and I should always say SetPort before
	drawing into the port.
2) Alarm clock is broken and I shouldn't worry about it.
3) Alarm clock is broken, and I should be conservative about it and call
	SetPort just in case.

Which is the right answer?

Ed Rothberg
rothberg@polya.stanford.edu