IDE get's "stuck"

Eric Chatonet eric.chatonet at sosmartsoftware.com
Wed Jun 1 15:50:19 EDT 2005


Hi Jon again,

As usual Klaus is right :-)
But another thing might interest you...
When you place many if/end if statements, the engine has to explore  
all of them even though it's not necessary.
So you might prefer something like:

on menuPick s
if s = "ccw" then
   get angle of image "image"
   add 90 to it
   set angle of image "image" to it
ELSE if s = "cw" then
   subtract 90 from it
   set angle of image "image" to it
ELSE if s = "flip" then
   flip image "image" vertical
ELSE if s = "mirror" then
   flip image "image" horizontal
ELSE
   answer "There is an error I don't understand!"
end if
choose browse tool
end menuPick

Better, have a look at the switch structure in the docs, much more  
convenient to trap a menuPick message :-)

Best regards from Paris,

Eric Chatonet.


Le 1 juin 05 à 21:21, Jon a écrit :

> If I enter the following handler with "ccw" or "cw", it works  
> perfectly.  When I enter with "flip" or "mirror", the requested  
> operation is performed perfectly, but afterwards the cursor turns  
> into a plus sign, and I have to switch from run mode to design mode  
> and back to run mode before I can run the program again.  I'm sure  
> the change in cursor is a clue as to what is going on, but I don't  
> understand it.  Any hints?
>
> Jon Bondy
>
>
> on menuPick s
> if s = "ccw" then
>   get angle of image "image"
>   add 90 to it
>   set angle of image "image" to it
> end if
> if s = "cw" then
>   subtract 90 from it
>   set angle of image "image" to it
> end if
> if s = "flip" then flip image "image" vertical
> if s = "mirror" then flip image "image" horizontal
> end menuPick

---------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Plugins, tutorials and more on our website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        eric.chatonet at sosmartsoftware.com/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------



More information about the use-livecode mailing list