Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!ames!xanth!indri!nic.MR.NET!ns!jmh From: jmh@ns.network.com (1606) Newsgroups: comp.sys.mac.programmer Subject: Dialog problems Summary: response to tim's comments Keywords: Dialog Message-ID: <1426@ns.network.com> Date: 2 Jun 89 19:10:42 GMT Sender: jmh@ns.network.com (Joel Halpern 424-1606) Reply-To: jmh@ns.UUCP (Joel Halpern 424-1606) Organization: Network Systems Corporation Lines: 39 I attempted to mail this to Tim, but my mailer can not find tim@hoptoad.uucp, so I am posting this. Thank you for taking the time to respond. I appreciate your suggestion that I need a DisposDialog rather than a CloseDialog (yes, I pass NIL for the space to GetNewDialog). Unfortunately, that is actually what I do. Yes, I know that mopre accurate and complete information would make it easier to help out. Unfortunately, the code is on the MAC at home, and I am composing mail/news at work. Thus, I have to write down the code at home, and rekey it at work. I make some typos. To answer the specific question you asked, val is a static int. The processing code uses a local int variable i: for (i = 1; i <= strbuf[0]; i++) { if (strbuf[i] < '0' || strbuf[i] > '9') break; val = val*10 + strbuf[i] - '0'; } For completeneww, the routine begins by copying val to a local variable, and if the user clicks cancel, val is restored to its initial value. Otherwise, if ok or return was hit, I do some calculations to select a spot in the main window. Yes, I did not use proper internationalization or strs/str# resources. This is a simple program for my own use. While I have been a programmer for a long time (I am the in house consultant to the software development organization and reasonably fluent in C unix), this is only the second Macintosh program I have ever written. While I appreciate any assistance you can give me, please lighten up just a litttle in the accusatory tone. Thanks, Joel M. Halpern jmh@nsco.network.com Network Systems Corporation 612 - 424 - 1606