errant IDE messages

Thomas McGrath III 3mcgrath at adelphia.net
Wed Apr 27 12:13:17 EDT 2005


Hello my friends,

I have a problem. (we knew that) ;-)

I have a piece of code that had it's start from a mouseDown handler 
(hint - this starts the problem) BUT it seems that while various code 
is running that when it gets to this part and calls cResetGrayIcons 
that it takes a break and goes else where.

on cResetGrayIcons
   global gTheBKeys
   repeat for each line f in gTheBKeys -- Reset -- this makes all 18 gray
     set the visible of image f to true
   end repeat
end cResetGrayIcons

First it starts the repeat structure and after 3 or 4 rounds it then 
pauses (at least in debug mode it feels like a pause) and then it goes 
to a mouseEnter code and then it goes to a mouseMove handler and then 
it comes back to finish the repeat structure. I view this as errant 
behavior since it is right in the middle of a handler.

1. I don't know if it is starting the repeat again or if it is picking 
up where it left off?
2. I don't want it to do this since I am tracking a latency in my code 
and this is suspect?
3. For now I commented out the mouseEnter (I am considering getting rid 
of it completely) and it now just goes to mouseMove.
4. I need the mouseMove to keep my window moveable/dragable, Is there 
another way to keep a window moveable?

This is my window moveable code:
on mouseMove x,y
   if not the uAllowDrag of this stack then exit mouseMove
   put 1 into M
   set topLeft of img 1 to \
       M * (- item 1 of the screenMouseLoc + item 1 of the clickLoc),\
       M * (- item 2 of the screenMouseLoc + item 2 of the clickLoc)
   set the topLeft of me to \
       left of me + x - item 1 of the clickLoc,top of me + y - item 2 of 
the clickLoc
end mouseMove

Thanks in advance,

Tom


Thomas J. McGrath III
SCS
1000 Killarney Dr.
Pittsburgh, PA 15234
412-885-8541


More information about the use-livecode mailing list