Odd Things Happening to my Stacks

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Bantymom
Posts: 73
Joined: Fri Aug 27, 2010 4:32 am

Odd Things Happening to my Stacks

Post by Bantymom » Tue Oct 26, 2010 4:25 am

The strangest things have begun to happen to my stacks.

All of a sudden, it can't set any of my temporary variables, even those I use for only one thing. It demands that I declare every one of them as a local variable at the top of the card, and it didn't care at all before. Also, everything needs quotes, things that didn't need quotes before, like simple visual effects, and colors.

Code: Select all

      set the backgroundcolor of field "word" to white
      hide field "Score" with visual effect wipe left fast
I set about obeying its every whim, changing everything it wanted changed, and it only got worse and worse, until it told me it wanted a local variable quoted (properly declared), and that it couldn't find a card referenced in a line that wasn't referencing a card. It will run my older versions of the stack, but only if I make no changes to it.

This is getting very scary. What did I do?

Bantymom
2nd-grade Teacher, Poultry Fancier, Scottish Country Dancer
and Perpetual Beginner

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Odd Things Happening to my Stacks

Post by Dixie » Tue Oct 26, 2010 9:25 am

Hi...

Open one of your scripts and have a look at 'variable checking' under the 'Edit' menu... if it has a check mark in front of it, then select it to turn 'variable checking' off. .... 'Variable checking causes Revolution to perform a stricter check of your scripts. Using any variable without declaring it first, or using a literal string without encloning it in quotes causes a compile error. This behavior can be useful in tracking down certain subtle problems such as misspelling a variable name.' - page 77 of the User Guide.

be well

Dixie

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: Odd Things Happening to my Stacks

Post by bn » Tue Oct 26, 2010 9:54 am

Bantymom,

in addition to what Dixie wrote you might have accidentally set it in the Preferences -> Scirpt Editor -> Variable Preservation.

regards

Bernd

Bantymom
Posts: 73
Joined: Fri Aug 27, 2010 4:32 am

Re: Odd Things Happening to my Stacks

Post by Bantymom » Wed Nov 03, 2010 2:23 am

Dixie,
It was as you said, 'variable checking' had been selected. I'm sure I must have checked it by accident. That will teach me to go poking around menus I don't understand! I am so glad it was something so simple. I was terrified my RevMedia had been corrupted! I don't know what I would have done then.

Thank you also for pointing me back to page 77. I had read the entire User's Guide when I first started, but at that time it was too much at once and mostly incomprehensible. Now I search for things as I need them. I never would have thought to look at that section because I wasn't conscious of using the Debugging (though I guess I am when it boots me out of the stack and into the script, yes?) and so wouldn't have thought of searching for it. You have saved me!

Bernd,
Now you have me worried. After unclicking 'variable checking,' everything went back to normal, but upon checking the 'Variable Preservation' thing in Preferences, I see that is activated! Is that the same thing as 'variable checking'? Can it be unchecked in one place and turned on in the other? Am I headed for more trouble? Or are those two different things?

Cheers,
Bantymom

PS: I see that this Forum has been renamed to be specific for LiveCode. As a rank beginner still on RevMedia, am I still allowed to post here?
2nd-grade Teacher, Poultry Fancier, Scottish Country Dancer
and Perpetual Beginner

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Odd Things Happening to my Stacks

Post by Dixie » Wed Nov 03, 2010 3:38 am

Hey there....

Checking/Unchecking 'Variable Checking' in the edit menu of your script will be reflected in the revolution preferences pane, let your mouse hover over the 'strict compilation mode' checkbox and read the tooltip ... I am sure that Bernd pointed this out to you thinking that this might have been the way in which you got yourself into your plight in the first place...

As far as the change of name is concerned, it's just a case of .... 'plus ça change, plus c'est la même chose'

go gently,

Dixie

Post Reply