Re: Explicit Variables

2016-01-29 Thread Kay C Lan
On Sat, Jan 30, 2016 at 2:52 AM, Mark Waddingham wrote: > >> Heh - no - I misread Kay's post... Whenever I see 'explicitVariables' > mentioned I tend to think of 'Strict Compilation Mode'. > But you read my mind. I also see one and think the other. Thanks all for responses, they're perfect for t

Re: Explicit Variables

2016-01-29 Thread Mark Waddingham
On 2016-01-29 19:34, Richard Gaskin wrote: Mark Waddingham wrote: Is my understanding correct, or has the engine implementation of explicitVars changed? Heh - no - I misread Kay's post... Whenever I see 'explicitVariables' mentioned I tend to think of 'Strict Compilation Mode'. As you point

Re: Explicit Variables

2016-01-29 Thread Richard Gaskin
Mark Waddingham wrote: > That should work fine. The explicitVars property is only set in > the IDE around code which compiles / sets object scripts (i.e. > In the script editor). It is false the rest of the time. Is Kay using explicitVars or the IDE's "Strict Compilation Mode"? My understanding

Re: Explicit Variables

2016-01-29 Thread [-hh]
What about the following? on mouseUp do "local tvar=1.2" put 2*tvar end mouseUp Should NOT work. But this should work (as do recompiles?): on mouseUp do "local tvar=1.2" do "put 2*tvar" end mouseUp ___ use-livecode mailing list use-livecode@l

Re: Explicit Variables

2016-01-28 Thread Mark Waddingham
That should work fine. The explicitVars property is only set in the IDE around code which compiles / sets object scripts (i.e. In the script editor). It is false the rest of the time. Mark. Sent from my iPhone > On 29 Jan 2016, at 02:45, Kay C Lan wrote: > > Not a discussion about the pros a

Re: Explicit Variables

2016-01-28 Thread Dr. Hawkins
On Thu, Jan 28, 2016 at 6:45 PM, Kay C Lan wrote: > I assume creating dynamic variable names will not work with > explicitVariables set in the IDE but it will actually work in a standalone. > > Not work / work > or > Not work / not work > It *shouldn't* work from everything I know . . . in parti

Re: Explicit Variables again

2012-10-25 Thread J. Landman Gay
On 10/25/12 7:04 PM, Peter Haworth wrote: Ho Jacque, Just been playing around with this and there seems to be a problem using command-z to undo - leaves garbage in the script field? Yes, it can do that. The insertions the script makes aren't known to the editor. Undo is tracked by character po

Re: Explicit Variables again

2012-10-25 Thread Peter Haworth
Ho Jacque, Just been playing around with this and there seems to be a problem using command-z to undo - leaves garbage in the script field? Pete lcSQL Software On Fri, Oct 19, 2012 at 5:26 PM, J. Landman Gay wrote: > On 10/19/12 5:41 PM, Peter M. Brigham wrote: > >> For t

Re: Explicit Variables again

2012-10-19 Thread J. Landman Gay
On 10/19/12 7:41 PM, Peter Haworth wrote: By the way, what are the shortcuts for commenting? I haven't come across them. Cmd-hyphen to comment, Cmd-Shift-hyphen to uncomment. It affects whatever line the cursor is in; if you select multiple lines they are all affected. It's in the Edit me

Re: Explicit Variables again

2012-10-19 Thread Peter Haworth
Thanks Jacque, I plan to give this a whirl. This seems to have usefulness whether explicit vars are in force or not. By the way, what are the shortcuts for commenting? I haven't come across them. Having stirred up a hornet's nest with this issue, I think I will refrain form starting another st

Re: Explicit Variables again

2012-10-19 Thread J. Landman Gay
On 10/19/12 5:41 PM, Peter M. Brigham wrote: For those who are interested here is my version (slightly altered from yours, Jacque). They are all control-shift keypresses that work only in the IDE script editor. Actually, heavily modified. :) Here's mine for comparison. It uses the command key

Re: Explicit Variables again

2012-10-19 Thread J. Landman Gay
On 10/19/12 6:11 PM, Peter Haworth wrote: Peter, You got it! Thanks for the script also (and Jacque). I have to admit I'm not entirely sure of all the benefits of it but I'm sure they'll come though when I give it a try. Mine is much simpler than the one Peter posted, he's added some stuff.

Re: Explicit Variables again

2012-10-19 Thread Peter Haworth
Peter, You got it! Thanks for the script also (and Jacque). I have to admit I'm not entirely sure of all the benefits of it but I'm sure they'll come though when I give it a try. Pete lcSQL Software On Fri, Oct 19, 2012 at 3:44 PM, Peter M. Brigham wrote: > On Oct 19,

Re: Explicit Variables again

2012-10-19 Thread Peter M. Brigham
On Oct 19, 2012, at 12:59 PM, Peter Haworth wrote: > Sounds like this is turning into a "There are 2 types of Livecode coders, > those who..." situation! as in "there are 10 kinds of people, those who understand binary, and those who don't." or how about "there are 3 kinds of people, those who

Re: Explicit Variables again

2012-10-19 Thread Peter M. Brigham
On Oct 19, 2012, at 2:00 PM, J. Landman Gay wrote: > Typos are almost never a problem for me. I only type variable names once when > I first write them. I have a custom frontscript that includes a whole lot of > handy things, one of which is the ability to insert or replace the selection > with

RE: Explicit Variables again

2012-10-19 Thread Ralph DiMola
: How to use LiveCode Subject: Re: Explicit Variables again On 10/19/12 11:41 AM, Richard Gaskin wrote: > If I also take the time to declare every variable (or, as we've seen, > most variables, since apparently not all require declaration under > explicitVars), that's just ex

Re: Explicit Variables again

2012-10-19 Thread Peter Haworth
Richard, Thanks for the explanation and QCC request to document it. Hopefully they documentation update will include the msgChanged message too. Pete lcSQL Software On Fri, Oct 19, 2012 at 10:25 AM, Richard Gaskin wrote: > Peter Haworth wrote: > > messageBoxRedirect?

Re: Explicit Variables again

2012-10-19 Thread Ben Rubinstein
On 18/10/2012 19:45, Richard Gaskin wrote: IIRC, explicitvars were seen as too cumbersome to work with, since as a truly global property the required that EVERYTHING you're using comply with it, and too many plugins didn't. I don't think the problem was with plugins, so much as the basic IDE.

Re: Explicit Variables again

2012-10-19 Thread Ben Rubinstein
On 18/10/2012 21:46, J. Landman Gay wrote: On 10/18/12 3:20 PM, Peter Haworth wrote: I certainly don't want to force anyone except me into using explicit vars, or strict compile mode, or whatever the correct term is, but I do want to use them when developing on my computer. I'm still trying t

Re: Explicit Variables again

2012-10-19 Thread J. Landman Gay
On 10/19/12 11:41 AM, Richard Gaskin wrote: If I also take the time to declare every variable (or, as we've seen, most variables, since apparently not all require declaration under explicitVars), that's just extra stuff to revise while I'm also revising code. So I can see how it would be a benef

Re: Explicit Variables again

2012-10-19 Thread Mark Wieder
Peter Haworth writes: > Sounds like this is turning into a "There are 2 types of Livecode coders, > those who..." situation! It was ever thus. Nothing wrong with that. I understand the arguments about it being too much typing, especially if you never make mistakes. But given half a chance I'll a

Re: Explicit Variables again

2012-10-19 Thread Mark Wieder
Richard Gaskin writes: > I agree with everything you wrote, but I still don't do it. :) LOL. > I think it's just a question of work style. Yep. And far be it from me to get in the way of what makes you productive. For my part, forcing explicitVars true makes me more productive down the road at

Re: Explicit Variables again

2012-10-19 Thread Richard Gaskin
Peter Haworth wrote: messageBoxRedirect? I can find no mention of that in the dictionary. What does it do? I look forward to seeing your message box replacement Richard. I have that as a future enhancement to my lcStackBrowser plugin but sounds like you may have saved me the trouble! My ba

Re: Explicit Variables again

2012-10-19 Thread Peter Haworth
That explains a lot, thanks Richard. I admit I had not been understanding your posts but I think this clarifies it. I assume this is what happened when explicit variables were first implemented but that now the situatio is as you described in your email with the script of the "Apply" process. Pet

Re: Explicit Variables again

2012-10-19 Thread Peter Haworth
messageBoxRedirect? I can find no mention of that in the dictionary. What does it do? I look forward to seeing your message box replacement Richard. I have that as a future enhancement to my lcStackBrowser plugin but sounds like you may have saved me the trouble! Pete lcSQL Software

Re: Explicit Variables again

2012-10-19 Thread Peter Haworth
Sounds like this is turning into a "There are 2 types of Livecode coders, those who..." situation! Marks' comment below hit the nail on the head for me. All I can say is that when I converted my first stack to use explicit variables, it turned up a couple of nasty bugs lurking in seldom used part

Re: Explicit Variables again

2012-10-19 Thread Richard Gaskin
Mark Wieder wrote: Look, as a qa engineer let me state the truism that the earlier in the development process you can find bugs, the cheaper it is to fix them. The idea of enforcing explicit variable declarations is to catch some bugs at compile time rather then waiting for them to appear at run

Re: Explicit Variables again

2012-10-19 Thread Mark Wieder
Richard- Friday, October 19, 2012, 7:47:22 AM, you wrote: > I've since added a bunch of shortcuts I use all the time, like listing > globals vars and props, and stack lists, and the message path, and other > stuff, and then I started down the road of implementing a few shell > calls like "ls" an

Re: Explicit Variables again

2012-10-19 Thread Mark Wieder
Richard- Friday, October 19, 2012, 7:47:22 AM, you wrote: > "Avoid the pain of Windows 8" I run the Win8 Customer Preview in a VM at work, and while LC mostly works as a desktop app, I reported a couple of bugs that the rev team hasn't been able to reproduce. There's also one *really* annoying o

Re: Explicit Variables again

2012-10-19 Thread Richard Gaskin
Mark Wieder wrote: Richard- Thursday, October 18, 2012, 8:51:46 PM, you wrote: Remember that LiveCode is dynamically compiled - the only copy of a script stored with a stack is the source copy, not any tokenized version. So whenever you open a stack, as part of the unpacking its scripts are

Re: Explicit Variables again

2012-10-18 Thread Thierry Douez
2012/10/19 Jerry Jensen : > On Oct 18, 2012, at 9:32 PM, Mark Wieder wrote: >> >> But I've had >> explicitVars enabled from the preferences menu for years and never had >> a problem. > > I'm writing as a far more pedestrian user of LC than either Mark or Richard. > I've had explicit variables enab

Re: Explicit Variables again

2012-10-18 Thread Jerry Jensen
On Oct 18, 2012, at 9:32 PM, Mark Wieder wrote: > > But I've had > explicitVars enabled from the preferences menu for years and never had > a problem. I'm writing as a far more pedestrian user of LC than either Mark or Richard. I've had explicit variables enabled from the prefs for a long time

Re: Explicit Variables again

2012-10-18 Thread Mark Wieder
Richard- Thursday, October 18, 2012, 8:51:46 PM, you wrote: > Remember that LiveCode is dynamically compiled - the only copy of a > script stored with a stack is the source copy, not any tokenized > version. So whenever you open a stack, as part of the unpacking its > scripts are dynamically co

Re: Explicit Variables again

2012-10-18 Thread Richard Gaskin
Mark Wieder wrote: > Thursday, October 18, 2012, 12:54:22 PM, you wrote: > >> If you choose to use explicitVars that's your own choice. But with all >> due respect, you're not the only one making plugins. > > Sure, but as I pointed out, it doesn't affect other plugins. As long > as you don't nee

Re: Explicit Variables again

2012-10-18 Thread Mark Wieder
Richard- Thursday, October 18, 2012, 12:54:22 PM, you wrote: > If you choose to use explicitVars that's your own choice. But with all > due respect, you're not the only one making plugins. Sure, but as I pointed out, it doesn't affect other plugins. As long as you don't need to compile plugins

Re: Explicit Variables again

2012-10-18 Thread Mark Wieder
Richard- Thursday, October 18, 2012, 12:54:22 PM, you wrote: >> Oh, wait... you're trolling again, right? > I don't understand your frequent use of "trolling". I wasn't "trolling" My apologies. I assumed a after that statement, but I guess it didn't come across without my making it explicit.

Re: Explicit Variables again

2012-10-18 Thread J. Landman Gay
On 10/18/12 3:20 PM, Peter Haworth wrote: I certainly don't want to force anyone except me into using explicit vars, or strict compile mode, or whatever the correct term is, but I do want to use them when developing on my computer. I'm still trying to figure out why anyone would want to. Some

Re: Explicit Variables again

2012-10-18 Thread J. Landman Gay
On 10/18/12 2:54 PM, Richard Gaskin wrote: And as far as I know, Jacque wasn't "trolling" each of the times you suggested she was either. Actually he said I indulged in hyperbole. But I've said a million times I don't do that. :) -- Jacqueline Landman Gay | jac...@hyperactivesw.c

Re: Explicit Variables again

2012-10-18 Thread Peter Haworth
Hi Richard, I think perhaps I didn't explain what I am trying to achieve very well. I certainly don't want to force anyone except me into using explicit vars, or strict compile mode, or whatever the correct term is, but I do want to use them when developing on my computer. The scheme I had in min

Re: Explicit Variables again

2012-10-18 Thread Richard Gaskin
Mark Wieder wrote: Richard- Thursday, October 18, 2012, 11:45:18 AM, you wrote: There are probably some users who run with it on, but not many. ...sad, but possibly true. IIRC, explicitvars were seen as too cumbersome to work with, since as a truly global property the required that EVERYT

Re: Explicit Variables again

2012-10-18 Thread Mark Wieder
Richard- Thursday, October 18, 2012, 11:45:18 AM, you wrote: > There are probably some users who run with it on, but not many. ...sad, but possibly true. > IIRC, explicitvars were seen as too cumbersome to work with, since as a > truly global property the required that EVERYTHING you're using c

Re: Explicit Variables again

2012-10-18 Thread Joe Lewis Wilkins
Richard, When this recently occurred when I started reworking one of my old projects, I was non-plussed, having actually forgotten how to declare vars explicitly. (smile) With my very poor vision I started looking for instances in which I had done so in the past and could not find any. So I am

Re: Explicit Variables again

2012-10-18 Thread Richard Gaskin
I wouldn't worry too much about making your scripts "compliant" with explicitvars. There are probably some users who run with it on, but not many. The IDE itself doesn't really use it except during compilation only, it seems - here's where the dizzyingly long chain of commands that gets invok

Re: Explicit Variables again

2012-10-18 Thread Chris Sheffield
Or there's this property that can be set: explicitVariables = true or false :-) On Oct 18, 2012, at 11:28 AM, Chris Sheffield wrote: > Pete, > > It is possible to toggle it via the Edit menu when you have a script window > open. Still a hassle, but doesn't take nearly as long as opening the

Re: Explicit Variables again

2012-10-18 Thread Chris Sheffield
Pete, It is possible to toggle it via the Edit menu when you have a script window open. Still a hassle, but doesn't take nearly as long as opening the prefs and doing it that way. Chris -- Chris Sheffield Read Naturally, Inc. www.readnaturally.com On Oct 18, 2012, at 11:20 AM, Peter Hawort