Path: utzoo!attcan!uunet!dino!ux1.cso.uiuc.edu!resnick From: resnick@cogsci.uiuc.edu (Pete Resnick) Newsgroups: comp.sys.mac.programmer Subject: Problem at closeDev Keywords: cdev dialog Message-ID: <1990Sep18.234445.28711@ux1.cso.uiuc.edu> Date: 18 Sep 90 23:44:45 GMT Sender: news@ux1.cso.uiuc.edu (News) Distribution: comp Organization: University of Illinois at Urbana Lines: 31 I have a real big problem in my cdev. I hope that someone will say, "Pete, you dope. This is simple. You forgot the semi-colon." Whatever... I have a routine that updates a resource according to what's in an editText box in my cdev. I call the routine when the OK button is hit and when the cdev gets closed. On the hitDev, everything works just ducky. I call the routine, passing it CPDialog, a handle to my data (I do it the old fashioned way), and numItems. I check each to make sure they have valid values entering the routine. They are all constant on entering. Then I do a GetDItem for the editText box. Boom. The value returned in the item Handle when I am on the hitDev is some longword. On the closeDev, I get a 0. Now, I don't know for sure that all the values in CPDialog and my data handle are correct (doing that in Macsbug would've been ugly), but I am sure numItems has not changed and the actual value of CPDialog and my data handle are perfectly constant. Do the dialog items disappear before the closeDev (that would be very bad, and unlikely since I have seen other cdevs check data on the close), or am I doing something stupid? If you would like to see actual code, I would be willing to trim down to a small non-working piece and send it to you. Any help would be *greatly* appreciated. Thanks, pr -- Pete Resnick (...so what is a mojo, and why would one be rising?) Graduate assistant - Philosophy Department, Gregory Hall, UIUC System manager - Cognitive Science Group, Beckman Institute, UIUC Internet/ARPAnet/EDUnet : resnick@cogsci.uiuc.edu BITNET (if no other way) : FREE0285@UIUCVMD