Page 1 of 1

Can't edit Stack script.

Posted: Sat Mar 02, 2019 11:46 pm
by trags3
Something happened to really mess up my stack.
Somehow part of my stack script disappeared. I have 2 handlers at the stack level.
There used to be 3 but somehow the first part of my third handler was lost including the "on emailLetter" statement and more than half of the rest of that handler. So I have ended up with the structure of the Stack code looking like this:

on preOpenStack
......
......
......
end preOpenStack

on openStack
....
....
....
end openStack
.....
......
.....
.....
end emailLetter

No matter what I do I am unable to save any changes to this code including deleting it entirely!
When I try to edit I can make changes but the changes cannot be saved.
I have even deleted the entire code but the change isn't saved.
Any ideas?

Tom

Re: Can't edit Stack script.

Posted: Sat Mar 02, 2019 11:48 pm
by trags3
BTW i'm using LC9.0.3 rc1
macBook Air macOS Mojave version 10.14.3
Tom

Re: Can't edit Stack script.

Posted: Sat Mar 02, 2019 11:54 pm
by FourthWorld
What is the full path to the errant stack file?

Can you post the stack file for review?

If not, can you reproduce this issue in a stack file you can post?

Re: Can't edit Stack script.

Posted: Mon Mar 04, 2019 2:34 pm
by trags3
Hi Richard,

The only thing I can think of as to how this might have happened is:
I had a handler called emailLetter at the stack level and in order to sort of clean things up I moved it to a card level. In LC 9.0.3 RC1 there are other stacks that open when you open the stack you want to work on. I had never noticed that before. Somehow only the top part of the emailLetter handler at the Stack level got deleted. I got no errors reported when I saved the stack and after that I was unable to edit the stack code that included the lower part of the email letter handler (including the "End emailLetter" statement but not the "On emailLetter" statement)
I was able to recreate the stack with LC 9.0.2 and get rid of the rest of the handler. I had to copy all cards and code into a stack with a different name but it works.
One thing I have done with this stack that might be unusual is that I have one card that I use for all of the data entry. I use several groups on that card that I show when I want to enter data on that screen while hiding all of the other groups (6 total). what this does for me is I only need to refer to fields on the same card when I fill in the data in the letter that I have the user create. No need to have 6 separate input cards. I don't know if that is a common practice or not but it has worked for me.

The bottom line is this: I don't know haw things got corrupted but for now it is fixed. I will let you know if things go awry when I get back to LC 9.0.3, probably later today. When I get some time I'll see if I can reproduce the problem with another stack.

Thank You,
Tom

Re: Can't edit Stack script.

Posted: Mon Mar 04, 2019 2:41 pm
by trags3
Looks like they took down LC 9.0.3.
Tom

Re: Can't edit Stack script.

Posted: Mon Mar 04, 2019 3:37 pm
by FourthWorld
trags3 wrote:
Mon Mar 04, 2019 2:41 pm
Looks like they took down LC 9.0.3.
I don't understand. It remains on the Downloads page:
https://downloads.livecode.com/livecode/

Re: Can't edit Stack script.

Posted: Mon Mar 04, 2019 7:38 pm
by dunbarx
One thing I have done with this stack that might be unusual is that I have one card that I use for all of the data entry. I use several groups on that card that I show when I want to enter data on that screen while hiding all of the other groups (6 total). what this does for me is I only need to refer to fields on the same card when I fill in the data in the letter that I have the user create. No need to have 6 separate input cards. I don't know if that is a common practice or not but it has worked for me.
Unrelated to your primary issue, but this is sound practice. You might one day need to go a step further, and use a subStack as a data entry form. Still sound practice.

Craig Newman

Re: Can't edit Stack script.

Posted: Mon Mar 04, 2019 8:12 pm
by trags3
Thank You Richard,

Your link works. From within LC itself 9.0.3 doesn't show up. Perhaps because I had it then deleted it.

Craig,

I'm glad to hear i'm doing something right. Just seemed easier to code that way.



Tom

Re: Can't edit Stack script.

Posted: Mon Mar 04, 2019 10:11 pm
by dunbarx
Just seemed easier to code that way.
More importantly, it keeps the sort of gadgetry that is only pertinent to data entry in one place. I find it simpler to add and fix stuff when I know which sandbox to play in.

Craig

Re: Can't edit Stack script.

Posted: Tue Mar 05, 2019 6:04 pm
by jacque
trags3 wrote:
Mon Mar 04, 2019 8:12 pm
Your link works. From within LC itself 9.0.3 doesn't show up.
Check the preferences, you may have set it to only notify you of stable releases.