mouseDown and within

Thomas McGrath III 3mcgrath at adelphia.net
Sat Apr 23 12:02:43 EDT 2005


Eric,

Thanks, Yeah I didn't specify the PDA simulation aspect before. No 
apology is needed of course. I appreciate the advice always.

So here is what I have so far (adapted to my needs of course). AND it 
works. Sort of. The problem is still two fold:
1. If I release the mouse over another acceptable control there is no 
mouseUp sent to it since the mouseDown doesn't want to. This is the 
same in a mouseMove.
and
2. The script below WORKS but leaves behind highlighted keys every 
couple of seconds. (oh so close) (it still will not send a mouseUp to 
the control we are over)

------
-- theKeys - holds my list of 18 acceptable buttons and the script is 
in the card
-- thecheck - I hope holds the last button that was highlighted

on mouseDown
   global theKeys
   if the short name of the target is among the lines of theKeys then -- 
  if "button" is in the target then
     CheckOtherButtons -- Æ
   end if
end mouseDown
---------------------------------------
on CheckOtherButtons
   global theKeys, thecheck
   if the mouse is up then exit CheckOtherButtons
   if thecheck is not empty then -- hopefully each 50 milliseconds this 
un-highlights the last key if there is one
     set the hilite of btn thecheck to false
   end if
   repeat for each line i in theKeys -- with i = 1 to the number of btns
     if the mouseLoc is within the rect of btn  i  then
       set the hilite of btn i to true
       put i into thecheck
     end if
   end repeat
   send "CheckOtherButtons" to me in 50 milliseconds
end CheckOtherButtons


Thanks I really need to get this right.

Tom

On Apr 23, 2005, at 11:35 AM, Eric Chatonet wrote:

> Hi Tom,
>
> I did not know you were working on a PDA interface: So, I apologize :-)
> The problem is very different indeed.



More information about the use-livecode mailing list