Flushing the "flushEvents" command...

m mlindley at telusplanet.net
Tue Feb 24 12:12:20 EST 2004


Ok, here’s my problem: in my app I have groups that pop-up (not
stacks
groups that include graphics, buttons, fields, etc
) but they are
much smaller than the full window.  I don’t want the user to be able
click outside the area of the popped-up group until that group’s actions
are completed.  I’ve been trying several things, all of which don’t seem
to be working. 
 
It would seem to me that using “flushEvents” should solve this problem,
but my app just seems to ignore this command and allow the user to click
where ever he/she wants.
 
Here is an example of my problem (I place this script in the popped-up
group’s script):
 
On mouseDown
            If the clickLoc is not within the rect of me then
                        Get flushEvents(“all”)
                        Beep
            End if
End mouseDown
 
The problem seems to persist even if I replace “clickLoc” with
“mouseLoc.”  What am I doing wrong with this?  Am I using this command
properly?  Is there an easier way to solve this problem? 
 
I’ve been trying to use the “exit mouseDown” command [or mouseUp

whatever] to interrupt the user’s click, but it seems to be ignored too.
I’m not sure what I’m doing wrong with this

 
Here’s my temporary workaround
 I use a cumbersome if
then statement in
the Card script to identify if the group’s “visible” is true or not.  If
it is then I just hide the popped up group if the user clicks outside of
it.  Obviously, that’s not the smartest way to go.  Help!


More information about the use-livecode mailing list