Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: Modeless dialogs, what am I doing wrong? Message-ID: <8040@hoptoad.uucp> Date: 18 Jul 89 20:03:45 GMT References: <1484@ndmath.UUCP> <14455@dartvax.Dartmouth.EDU> <8029@hoptoad.uucp> <14466@dartvax.Dartmouth.EDU> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 30 In article <14466@dartvax.Dartmouth.EDU> earleh@eleazar.dartmouth.edu (Earle R. Horton) writes: > Well, that seems to work too. I suppose your method is the >better one, being high level and all. One thing puzzles me though. >Nowhere can I find actual Apple documentation on how to do this, or >even a hint that I should do anything with null events except toss >them. I looked at the description of IsDialogEvent() just now, and >just maybe you could interpret it to mean that the function wants to >look at null events, but then again, maybe not. Uh, this is kind of a strange comment. Inside Mac volume I, pages I-416 and I-418 spell this all out. "If your modeless dialog contains any editText items, you must call IsDialogEvent (and then DialogSelect) even if GetNextEvent returns FALSE; otherwise your dialog won't receive null events and the caret won't blink." "If the event isn't one that DialogSelect specifically checks for (if it's a null event, for example), and there's an editText item in the dialog, DialogSelect calls the TextEdit procedure TEIdle to make the caret blink." Still, astute readers may recall that I've also been bitten here by missing things in Inside Macintosh (such as the relocatable assignment problem), so perhaps it isn't really a strange comment after all.... -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "He goes on about the wailing and gnashing of teeth. It comes in one verse after another, and it is quite manifest to the reader that there is a certain pleasure in contemplating the wailing and gnashing of teeth, or else it would not occur so often." -- Bertrand Russell, "Why I Am Not a Christian"