Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!mit-eddie!bu-cs!dartvax!northstar.dartmouth.edu!earleh From: earleh@northstar.dartmouth.edu (Earle Horton) Newsgroups: comp.sys.mac.programmer Subject: Re: Modeless dialogs, what am I doing wrong? Message-ID: <14490@dartvax.Dartmouth.EDU> Date: 19 Jul 89 08:27:11 GMT References: <1484@ndmath.UUCP> <14455@dartvax.Dartmouth.EDU> <8029@hoptoad.uucp> Sender: news@dartvax.Dartmouth.EDU Reply-To: earleh@northstar.dartmouth.edu (Earle Horton) Organization: Project NORTHSTAR, Dartmouth College Lines: 39 In article <8029@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes: >In article <1484@ndmath.UUCP> milo@ndmath.UUCP (Greg Corson) writes: >>What do I have to do to get the cursor to blink normally in the EditText >>items of a modeless dialog? > >In article <14455@dartvax.Dartmouth.EDU> earleh@eleazar.dartmouth.edu >(Earle R. Horton) writes: >> DialogPeek xyzzy; /* Points to your Modeless dialog. */ >> >> TEIdle(xyzzy->textH); > >That will work, but a better way is to call DialogSelect in response >to null events. I have philosophical objections to using DialogPeek. >After all, why be low level when you can be high level? If you're using modeless dialogs, you might also want to set the mouse cursor to the iBeamCursor cursor whenever the mouse is in an active editText item. Point plover; DialogPeek xyzzy; CursHandle plugh; plugh = GetCursor(iBeamCursor); GetMouse(&plover); if( xyzzy == (DialogPeek)FrontWindow()){ if(PtInRect(mouse,&(*xyzzy->textH)->viewRect)){ SetCursor(*plugh); }else{ SetCursor(&qd.arrow); } } I was kind of wondering how Mr. Mahoney gets around his philosophical problem with DialogPeek here. Earle R. Horton "People forget how fast you did a job, but they remember how well you did it." Salada Tag Lines