[SOLVED] end if
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
[SOLVED] end if
I am accustomed to writing "endif" and not "end if". Is there a way to put a constant that would do the text substitution for me if I make that mistake. I could put the script in all of my new projects until I get accustomed to "end if".
Linda
Linda
Last edited by anmldr on Thu Sep 20, 2012 3:23 pm, edited 1 time in total.
Re: end if
Hi Linda,
not build-in and not an easy task to script, but why not just use the FIND & REPLACE feature of Livecode
to replace "endif" with "end if" after you completed your scripts??
Best
Klaus
not build-in and not an easy task to script, but why not just use the FIND & REPLACE feature of Livecode
to replace "endif" with "end if" after you completed your scripts??
Best
Klaus
Re: end if
You could try the glx2 editor. While it doesn't have the endif end if conversion built in there is a system to handle that type of change. I don't recall the name of the feature off the top of my head but basically its a way to setup macros that will do the changes on compile. There are a few already written, but the only one I remember at the moment is the ability to set variable values using the more common methods.
i = 1
This is automagically converted to lc type syntax. (I think you have to turn this functionality on)
Worth a look at least.
i = 1
This is automagically converted to lc type syntax. (I think you have to turn this functionality on)
Worth a look at least.
Re: end if
It's the glx2 preprocessor mechanism for macros, and it's there by default. You can turn it off, but otherwise it just sits in the background until you compile.
That said, I just added "endif" to the preprocessor, and while it works, it does screw up the script formatting. I'll see what I can do.
Meanwhile, Linda, just get used to typing "end if". I feel your pain here because I'm constantly typing "endif" myself and having to correct it.
That said, I just added "endif" to the preprocessor, and while it works, it does screw up the script formatting. I'll see what I can do.
Meanwhile, Linda, just get used to typing "end if". I feel your pain here because I'm constantly typing "endif" myself and having to correct it.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: end if
I can definitely get used to "end if". The question though was a general one for text substitution for something like #define in XCode.
Linda
Linda
Re: end if
Well, I've got mixed feelings about macros in general. You can get into weird problems with macros that are hell to debug.
But no, there isn't a #define construct. The closest thing is to use a constant, and that won't work for substituting keywords.
But no, there isn't a #define construct. The closest thing is to use a constant, and that won't work for substituting keywords.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: end if
How about typinator? Not free, but super useful anyway. http://www.ergonis.com/products/typinator/
A pretty good text expander, and if I recall correctly you can set expansion rules to be program specific.
A pretty good text expander, and if I recall correctly you can set expansion rules to be program specific.