Why are scripts running in edit mode

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Sjatplat
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 75
Joined: Wed Jun 22, 2011 1:53 pm

Why are scripts running in edit mode

Post by Sjatplat » Fri Mar 21, 2014 12:46 am

Hi

There is a lot of hicupps when I code these days. It's propably my own fault - but livecode seems to freeze now and then and then I cannot save my latest revisions and have to force-quit Livecode, I'm starting to wonder if this has something to do when you are in edit mode and not in run (browse) mode. Scripts like mouseEnter and mouseleave still runs even in edit mode. Why is this? is it possible to make livecode stop COMPLETELY when in edit mode?

as an example: I have a field that hides when the mouse leaves it. I want to edit it's script. But since mouseLeave still operates in edit mode I have to open the appliation browser to find and edit it's script. It's irritating.

Sjat

PBH
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 133
Joined: Sun Feb 20, 2011 4:26 pm
Contact:

Re: Why are scripts running in edit mode

Post by PBH » Fri Mar 21, 2014 2:28 am

Hi Sjat,

You can turn off "Messages" in the toolbar (at the top of the screen) to stop any scripts from processing while you are working, alternatively go to Development>Suppress messages in the menus, but of course you will need to remember to turn them back on again to test your stacks in the IDE.

Maybe a better way for scripts like you mention would be to add a condition to test the environment and react accordingly…

Code: Select all

on mouseLeave
   -- Holding the cmdKey down will still allow you to test in the IDE
   if the environment is "development" and the cmdKey is not down then exit mouseLeave
   hide me
end mouseLeave
HTH

Paul

Post Reply