Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!amdahl!rtech!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: Modeless dialogs, what am I doing wrong? Message-ID: <8032@hoptoad.uucp> Date: 18 Jul 89 07:45:56 GMT References: <5266@ipl.jpl.nasa.gov> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 26 In article <5266@ipl.jpl.nasa.gov> dfs059@ipl.jpl.nasa.gov (Dan Stanfill) writes: >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; > } No, I'm sorry, but if you'd taken the ten seconds to consult Inside Mac before you posted this, you'd have seen that IsDialogEvent does no such thing. It is DialogSelect that will do the cursor blinking on a null event. IsDialogEvent by itself will do exactly nothing. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "A book is the product of a contract with the Devil that inverts the Faustian contract, he'd told Allie. Dr Faustus sacrificed eternity in return for two dozen years of power; the writer agrees to the ruination of his life, and gains (but only if he's lucky) maybe not eternity, but posterity, at least. Either way (this was Jumpy's point) it's the Devil who wins." -- Salman Rushdie, THE SATANIC VERSES