implicitVars [Was: Re: Best Practices in Rev development]

Kay C Lan lan.kc.macmail at gmail.com
Tue Jun 26 23:17:28 EDT 2007


On 6/26/07, Alex Tweedly <alex at tweedly.net> wrote:
>
> This gives the advantage of a short, clean, easy-to-read script while
> preserving the advantage of error detection. The need to respond to such
> a dialog once per local variable would be (at least for me) a small
> price to pay - and is certainly much lighter a burden than the need to
> add a declaration for each.



I don't declare variables because I do find that it is easier to use the Var
Watcher to pick up typos than it is to go through the hassle of all the
extra typing to declare variables - where I can make extra typos anyway;-(

Therefore I do like what your proposing, my only suggestion would be the
'respond to such a dialog once per local' sounds like you'd keep having this
annoying dialog box pop-up requiring your attention - well for me anyway who
creates Vars like rabbits breeding*:-) I'd prefer a single box (substack)
listing all the 'offenders' followed by two radio buttons - amend,declare.
What would even be better would be some 'intelligence' like the google
search field that when you type in 'Bombya Hotl' it asks: did you mean
'Bombay Hotel' - so that if you already had a declared variable
tMyTextColour and you typed in tMyTextColor when the parser ran the box
would pop up and amongst the list of errors one of the lines would say:
tMyTextColor  did you mean tMyTextColour   Yes   Amend   Declare (as radio
buttons)

I can but dream :-)

*PS. I do try to cull my vars once I've got the required result.



More information about the Use-livecode mailing list