Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!usc!elroy.jpl.nasa.gov!mipl3!dfs059 From: dfs059@ipl.jpl.nasa.gov (Dan Stanfill) Newsgroups: comp.sys.mac.programmer Subject: Re: Modeless dialogs, what am I doing wrong? Message-ID: <5266@ipl.jpl.nasa.gov> Date: 17 Jul 89 15:02:34 GMT Organization: Jet Propulsion Laboratory, Image Processing Lab Lines: 31 >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? > > DialogPeek xyzzy; /* Points to your Modeless dialog. */ > > TEIdle(xyzzy->textH); > >Earle R. Horton NO! While that may work, for a modeless dialog, IsDialogEvent() handles the cursor blinking. The secret is to make sure you call it even when there is no event, as in the following example: something_happened = GetNextEvent(everyEvent, &event); if (IsDialogEvent(&event)) /* call even if nothing happened */ { /* to make cursor blink */ doDialogs(&event); if (event.what != keyDown) continue; } if (something_happened) { . . . Dan Stanfill dfs@mipl8.jpl.nasa.gov