Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!purdue!bu-cs!dartvax!eleazar.dartmouth.edu!earleh From: earleh@eleazar.dartmouth.edu (Earle R. Horton) Newsgroups: comp.sys.mac.programmer Subject: Re: Modeless dialogs, what am I doing wrong? Message-ID: <14522@dartvax.Dartmouth.EDU> Date: 20 Jul 89 07:30:12 GMT References: <1484@ndmath.UUCP> <14455@dartvax.Dartmouth.EDU> <8029@hoptoad.uucp> <14490@dartvax.Dartmouth.EDU> <8070@hoptoad.uucp> Sender: news@dartvax.Dartmouth.EDU Reply-To: earleh@eleazar.dartmouth.edu (Earle R. Horton) Organization: Thayer School of Engineering Lines: 35 In article <8070@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes: >In article <14490@dartvax.Dartmouth.EDU> earleh@northstar.dartmouth.edu >(Earle Horton) writes: >> 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. [Example using DialogPeek->textH] >> I was kind of wondering how Mr. Mahoney gets around his >>philosophical problem with DialogPeek here. > >Well, Mr. Norton (or should I say, Emperor Norton), you use the >FindDItem call. As it says in Inside Mac IV-60, "FindDItem is useful >for changing the cursor when it's over a particular item." Something >along the lines of: [Example using FindDItem] Hmm, that's not bad. It doesn't give the effect I was trying to describe, however. I consider the "active" editText item to be that item with the insertion point or active selection range in it. The idea is to use the iBeamCursor only when the cursor is over this item, and not over other, non-selected editText items. Before anyone accuses me of using a strange User Interface technique, let me say that the effect I am suggesting is also used by the MPW Commando tool, although I don't know what method Commando uses. (*DialogPeek->textH)->viewRect gives you the Rect enclosing the active editText item, which is what I need for my cursor changing algorithm to work. I don't suppose you could find that without using DialogPeek? Earle R. Horton *