Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!pacbell!varian!kinetics!buzz From: buzz@kinetics.UUCP (Mahboud Zabetian) Newsgroups: comp.sys.mac.programmer Subject: cdev/Control Panel bug or undocumented action? Message-ID: <611@kinetics.UUCP> Date: 3 Aug 88 23:45:20 GMT Reply-To: buzz@kinetics.UUCP (Mahboud Zabetian) Organization: Kinetics, Inc. Lines: 37 I am writing a cdev and noticed a funny behaviour when a closeDev message was encountered. It seems as if the value of CPDialog is not valid. If I do a GetCtlValue, the item is not found and a bus error occurs.(I do add numItems to the number of my item). For instance, in the following code, a beep is sounded on a deActivDev, but none for a closeDev: case closeDev: GetDItem(CPDialog, MANBUTTON + numItems, &itemType, &ctrl, &box); if (GetCtlValue(ctrl)) SysBeep(9); TEToScrap(); cdevValue = 0; tcPanel = nill; break; case deActivDev: GetDItem(CPDialog, MANBUTTON + numItems, &itemType, &ctrl, &box); if (GetCtlValue(ctrl)) SysBeep(9); Does anyone know if the closeDev message is supposed to have such a side effect or whether this is a bug? Or am I making a mistake? Thanx. Standard Disclaimer: Don't mind me, I'm just babbling. ------------------------------------------------------------------------------- Mahboud Zabetian (415) 256-3702 buzz@kinetics.uucp Kinetics, Inc. ...!ucbvax!mtxinu!kinetics!buzz 2540 Camino Diablo ***Coming soon: buzz@kinetics.com !!*** Walnut Creek, CA 94596 mtxinu!kinetics!buzz@ucbvax.berkeley.edu ------------------------------------------------------------------------------- "You may ask yourself, how did I get here? This isn't my beautiful..." --- Talking Heads -------------------------------------------------------------------------------