Path: utzoo!attcan!uunet!mcvax!unido!fauern!faui44!immd1.informatik.uni-erlangen.de!msurlich From: msurlich@immd1.informatik.uni-erlangen.de (Matthias Urlichs - scheme) Newsgroups: comp.sys.mac.programmer Subject: Re: Dialogs in INITS (LSC3) Message-ID: <634@faui44.informatik.uni-erlangen.de> Date: 12 Sep 88 16:00:57 GMT References: <1325UD040164@NDSUVM1> <6860023@vx2.NYU.EDU> <16736@apple.Apple.COM> <16737@apple.Apple.COM> Reply-To: m_urlichs@msn.rmi.de (Matthias Urlichs) Organization: CSD., University of Erlangen, W - Germany Lines: 27 In article <16737@apple.Apple.COM> han@apple.com.UUCP (Byron Han, Architect) writes: > In article <16736@apple.Apple.COM> han@apple.com.UUCP (Byron Han, Architect) writes: > >Yes you need to INIT the appropriate managers. For Dialogs, this would be > >InitGraf(@thePort); > > Oops. thePort is a global variable and as such should not be used. (standalone > code and all that). > > I believe that ShowInit already calls InitGraf for you so if you are using > ShowInit you are okay. > Looking at INIT31 reveals that InitGraf has already been called. However, some Inits do it themselves and leave A5 pointing to anything at all afterwards, so it's bad to call InitGraf (using your own port) and it may create problems not to... Anyone have a good procedure to check if InitGraf has been called? (Like comparing Arrow to a resource which contains a cloned version of the standard cursor?) As an aside, Init31 also checks if the Cached bit is set and skips the INIT/RDEV/cdev file if it is. Anyone have a newer version of AAsk (or a patch) which looks at that bit instead of changing the file type to "xNIT" and similar nonsense :-( ? -- Matthias Urlichs CompuServe: 72437,1357 Delphi: URLICHS Rainwiesenweg 9 Phone: +49+911-574180 8501 Schwaig 2 NetMail: m_urlichs@msn.rmi.de West Germany or: (r)eply and (h)ope