errant IDE messages

MisterX b.xavier at internet.lu
Wed Apr 27 12:25:36 EDT 2005


> Hello my friends,
> 
> I have a problem. (we knew that) ;-)

very funny! ;)

> 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.

Where are your scripts located BTW?
a card or stack with a mouseenter handler will trigger anytime you enter 
a control... Im thinking this is possible cause...

> on cResetGrayIcons
>    global gTheBKeys
>    repeat for each line f in gTheBKeys -- Reset -- this makes 
> all 18 gray

    -- always check!!!
    if there is an image f then...


>      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.

Does this happen when not in debug mode?

> 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?

yes... But not with mousemove... With mousedown

on mousedown
repeat while the mouse is down
  set the loc of my window to the mouseloc
  -- "see also" the mouseh, mousev, etc...
  -- this code is the base and not exactly smooth...
end repeat

you can make it a lot nicer like 
HotKeyN2O
http://www.monsieurx.com/modules.php?name=Downloads&d_op=getit&lid=74
or
BreakpointsN2O
http://www.monsieurx.com/modules.php?name=Downloads&d_op=getit&lid=77

The last one is described on the front page of monsieurx.com.

hope that helps
Xavier



More information about the use-livecode mailing list