Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site tolerant.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!oliveb!tolerant!berry From: berry@tolerant.UUCP (David Berry) Newsgroups: net.micro.mac Subject: Re: Using Dialogs in DA's Message-ID: <211@tolerant.UUCP> Date: Tue, 19-Nov-85 18:08:18 EST Article-I.D.: tolerant.211 Posted: Tue Nov 19 18:08:18 1985 Date-Received: Sat, 23-Nov-85 00:29:24 EST References: <5925@tektronix.UUCP> Distribution: net Organization: Tolerant Systems, Inc. San Jose, CA Lines: 31 > I am trying to use a Modal Dialog Box within a DA, and trying to process > it using the ModalDialog toolbox call. Unfortunately, this doesn't seem > to work very well, resulting in system crashes. Has anyone done this > successfully? If so, I would > appreciate some pointers. > > open() > { > . > . > DCEPtr->dCtlWindow = GetNewDialog(...); DCEPtr->dCtlWindow->windowKind = DCEPtr->dCtlRefNum; > . > . > } The setting of windowKind must be done regardless (as far as I've been able to determine) how the window is going to be used if you expect/want it's events to get back to the DA. In fact, some applications will probably puke all over you if you don't since the will be trying to do updates on windows which they don't recognize and/or know what to do with. How to prevent your application from being bombed by some DA that doesn't handle it's windows correctly is another problem entirely. Basically though you should ignore any window events that don't belong to a window you know about. -- David W. Berry ...!ucbvax!tolerant!berry [Don't shoot the Tolerant Systems, I'm just the consultant]