Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!uw-june!uw-entropy!dataio!suvax1!hirayama From: hirayama@suvax1.UUCP (Pat Hirayama) Newsgroups: comp.sys.mac.programmer Subject: Calling InitGraf from a DA in TML Pascal Message-ID: <1189@suvax1.UUCP> Date: 14 Aug 88 00:09:55 GMT Organization: Seattle University, Seattle, WA. Lines: 35 Hello world! I am a beginning Mac programmer and am writing a DA for my first project. I am running into a problem that is probably rather trivial for most of you out there, so I'd appreciate a hint. In the Open procedure, I need to make the following calls: InitGraf(@thePort) InitFonts; TEInit; (That is, I need to use some TextEdit routines, so I need TEInit, which in turn needs the other two calls; at least, that is what I think I am reading). Besides, I will need to use QuickDraw later on, so it seems best to initialize it at the beginning. The problem I am running into is that thePort is a QD Global variable and global variables are not allowed in a DA (or so everyone tells me). It is obvious that there is a way around this -- there are many DA's out there using QD. Can someone please show me the way? Thanks in advance, ------------------------------------------------------------------------------ Pat Hirayama, Computer & Information Services, Seattle U, Seattle, WA 98122 UUCP: ..!uw-entropy!{dataio,thebes}!suvax1!hirayama or: suvax1!hirayama@entropy.ms.washington.edu Bove's Theorem: The remaining work to finish in order to reach your goal increases as the deadline approaches. ------------------------------------------------------------------------------