Can't edit Stack script.

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
trags3
Posts: 432
Joined: Wed Apr 09, 2014 1:58 am

Can't edit Stack script.

Post by trags3 » Sat Mar 02, 2019 11:46 pm

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

trags3
Posts: 432
Joined: Wed Apr 09, 2014 1:58 am

Re: Can't edit Stack script.

Post by trags3 » Sat Mar 02, 2019 11:48 pm

BTW i'm using LC9.0.3 rc1
macBook Air macOS Mojave version 10.14.3
Tom

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10045
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Can't edit Stack script.

Post by FourthWorld » Sat Mar 02, 2019 11:54 pm

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?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

trags3
Posts: 432
Joined: Wed Apr 09, 2014 1:58 am

Re: Can't edit Stack script.

Post by trags3 » Mon Mar 04, 2019 2:34 pm

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

trags3
Posts: 432
Joined: Wed Apr 09, 2014 1:58 am

Re: Can't edit Stack script.

Post by trags3 » Mon Mar 04, 2019 2:41 pm

Looks like they took down LC 9.0.3.
Tom

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10045
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Can't edit Stack script.

Post by FourthWorld » Mon Mar 04, 2019 3:37 pm

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/
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10317
Joined: Wed May 06, 2009 2:28 pm

Re: Can't edit Stack script.

Post by dunbarx » Mon Mar 04, 2019 7:38 pm

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

trags3
Posts: 432
Joined: Wed Apr 09, 2014 1:58 am

Re: Can't edit Stack script.

Post by trags3 » Mon Mar 04, 2019 8:12 pm

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

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10317
Joined: Wed May 06, 2009 2:28 pm

Re: Can't edit Stack script.

Post by dunbarx » Mon Mar 04, 2019 10:11 pm

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

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Can't edit Stack script.

Post by jacque » Tue Mar 05, 2019 6:04 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply