Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!ucsd!mvb.saic.com!ncr-sd!ncrcae!hubcap!mcmac From: mcmac@hubcap.clemson.edu (Scott McAlister) Newsgroups: comp.sys.mac.programmer Subject: Dialog within an INIT Message-ID: <1991Mar21.183154.22245@hubcap.clemson.edu> Date: 21 Mar 91 18:31:54 GMT Organization: Clemson University Lines: 38 In an INIT that I am writing, I want to display a Dialog Box when I trap on MountVol. I keep getting a "Bus Error" (using 6.0.7 on a IIsi). I am using THINK C 4.02. Here is some of my code: (actually most of this came from J. Peter Hoddie's article in Oct. 89 MacTutor) showDialog() { DialogPtr myDialog; GrafPtr oldPort; int item; GetPort(&oldPort); myDialog = GetNewDialog(dialogID,nil,-1); SetPort(myDialog); do { ModalDialog(nil,&item); } while (item != 1); DisposDialog(myDialog); SetPort(oldPort); } Any help and/or comments would be appreciated. -- Scott ================================================== | Scott McAlister | mcmac@hubcap.clemson.edu | | CS Senior | | | Clemson University | | | Home address: 390 Boggs Rd. | | Pickens, SC 29671 | ==================================================