Page 1 of 1
Disabling mouse events.
Posted: Wed Apr 23, 2014 1:30 am
by tasdvl9
Hello All,
I'm trying to disable all mouse messages when I am accessing a very large database using dbGet.
I'd like the cursor to show busy and not give the user the ability to click on the window my data grid resides on.
Any reccomendations?
Thanks!
Re: Disabling mouse events.
Posted: Wed Apr 23, 2014 2:30 am
by dunbarx
Hi.
Busy cursor, eh?
Do you plan on something blocking, like:
Code: Select all
on mouseUp
repeat until the optionkey is down
set cursor to busy
wait 1
end repeat
end mouseUp
If you put this into a button, you are locked out of doing just about everything until that optionKey goes down. I assume you would invoke this inside another handler, of course. Is this OK for you? I did mean everything...
Craig Newman
Re: Disabling mouse events.
Posted: Wed Apr 23, 2014 3:00 am
by tasdvl9
Hi Craig,
Thanks for the reply.
Basically what I am trying to do is set my cursor to busy or waiting while I access a very large database.
I would like to 'lock out' the user from being able to click on my card Window until the query from the data base has been completed
and my data grid has been filled up.
Re: Disabling mouse events.
Posted: Wed Apr 23, 2014 3:58 am
by Dixie
Have a read of 'flushEvents" in the dictionary...

Example of using from the dictionary...
Code: Select all
on mouseUp
-- ...lengthy handler goes here...
-- get rid of clicks since the handler started:
put flushEvents("mouseUp") into temp
end mouseUp
Re: Disabling mouse events.
Posted: Wed Apr 23, 2014 5:02 am
by dunbarx
Ah, Dixie has a much more "natural" solution. I ha forgotten about "flushEvents". You need to explicitly name each event that you want to preclude, however. My "old fashioned" method is more like a stubborn mule.
Craig
Re: Disabling mouse events.
Posted: Wed Apr 23, 2014 2:55 pm
by [-hh]
..........
Re: Disabling mouse events.
Posted: Wed Apr 23, 2014 3:17 pm
by tasdvl9
Thanks, Guys!
I wasn't even aware of the 'lock messages' command.
I think I have what I need to make substantial progress.
Much appreciated
