Indenting scripts

Shari shari at gypsyware.com
Thu Sep 8 12:23:58 CDT 2011


I finally installed LiveCode and the latest MC IDE 4.1 (had been 
using Rev prior to LiveCode).  For the most part it all went smoothly 
but I've encountered a really distracting issue.

I opened a project that was in-the-works and the script indent is 
awry, making it very difficult to work.

Example:

on someHandler
get random(5)

if it is 1 then

    else if it is 2 then

       else if it is 3 then

           else if it is 4 then

                else if it is 5 then

                      end if
                         end someHandler

                         on someOtherHandler

                         end someOtherHandler


If I have not filled in some of the else-ifs yet, those get indented 
additionally so that the end result is that the end of the handler is 
not lined up with the beginning, even though there are no errors in 
the handler. This additional indentation carries all the way down 
thru subsequent handlers as well so that every handler after the 
empty else-if is so indented that it's halfway across the window.

Sure I could put some bogus space filler in there but that sort of 
negates how I work, which isn't from top to bottom.  I'm accustomed 
to looking for the empty else-if's to fill in the blanks.  I'm also 
accustomed to creating blank-shells handlers so that I know what 
needs to be done.

Is there some way to fix the indents so that the only additional 
indents are for script errors, and not empty places that I just 
haven't filled in yet? This is driving me up a wall!

Shari


-- 
Bad Dog Books
http://books.gityasome.com
Critters, humor, patriots and sports t-shirts
http://www.bearsware.com
WlND0WS and MAClNT0SH shareware
http://www.gipsyking.com



More information about the metacard mailing list