I am new to live code. But this problem is irritating me. Sometimes it happens that after I write a program in LiveCode and after running it when I switch back to "Edit Mode" the program is still running.
For eg. I have given aeChangeRect command for an object but when I try to move the object to some place else on the card after switching it back to "Edit Mode" the object automatically goes to its old place.
Please help.
Program running in "Edit Mode"
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Program running in "Edit Mode"
Was the animation engine command completed before switching to Edit mode? Is there something in your code that might be reseting the location of the object?
Re: Program running in "Edit Mode"
Animation engine command was completed.
Is their a problem in it?
Code: Select all
on mouseDown
grab me
end mouseDown
on mouseMove
if within (graphic "innerPoly", the mouseloc) then
revRotatePoly the long ID of graphic "outerPoly",45
aeChangeRect the long ID of grc "outerPoly",the rect of grc "innerPoly", 1000
end if
end mouseMove
Re: Program running in "Edit Mode"
Since livecode is "live" certain things keep functioning no matter what mode you are in. If you are in edit mode, and click an object the ide catches the click and selects the object. But the object is still sitting there waiting for a click, the ide just keeps it from getting it.
The same applies for mousemove but the engine doesn't 'catch' it, so your mousemove works no matter what mode you're in.
There are a couple ways around this. You can turn off messages before moving that object (you can click the little envelope icon on the menu bar) or you can add a line like the following at the top of your mousemove:
At least I _think_ this is what is going on.
The same applies for mousemove but the engine doesn't 'catch' it, so your mousemove works no matter what mode you're in.
There are a couple ways around this. You can turn off messages before moving that object (you can click the little envelope icon on the menu bar) or you can add a line like the following at the top of your mousemove:
Code: Select all
if the tool is "pointer tool" then exit mousemove
At least I _think_ this is what is going on.
Re: Program running in "Edit Mode"
Thnx a lot Strugis.
Will try it.
Will try it.
