Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!chianti!shane From: shane@chianti.cc.umich.edu (Shane Looker) Newsgroups: comp.sys.mac.programmer Subject: Re: Calling InitGraf from a DA in TML Pascal Message-ID: <634@mailrus.cc.umich.edu> Date: 14 Aug 88 19:40:27 GMT References: <1189@suvax1.UUCP> Sender: usenet@mailrus.cc.umich.edu Reply-To: shane@um.cc.umich.edu (Shane Looker) Organization: University of Michigan Computing Center, Ann Arbor Lines: 26 In article <1189@suvax1.UUCP> hirayama@suvax1.UUCP (Pat Hirayama) writes: !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). DON'T CALL THE Init calls from a DA!! If an application is to support DAs, there are quite explicit rules as to what it must do. All Mac programs which can support DAs have already caled InitGraf. I guarantee that. The should have also Inited everything you will need. See the Desk Manager stuff for that. So the moral is to not call InitGraf & friends from a DA. Shane Looker Looker@um.cc.umich.edu