LC makes my stack a substack
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
LC makes my stack a substack
This problem harkens back to the problem I encountered earlier that still exists, but if someone here can help me I believe if someone here can explain this to me, it will fix my original issue.
I have two stacks residing in the same folder. One is destined to be the application stack. It is simply a means to navigate to the second stack.The second is destined NOT to be a substack.
When I open the first stack, it is it's own mainstack as it should be. When I navigate to the second stack, the inspector says it is a substack of the first stack.
If I click "make Mainstack" it does change to be it's own mainstack.Ok.
Now when I try to save the second stack, windows asks me if I want to replace that stack. Click yes,save and exit.
Now I cannot navigate to the second stack from the first stack.
Instead, I get this error from LC:
Handler: error in statement
Field
go stack "Jukebox2"
mouseup
I have uninstalled and reinstalled LC twice while battling this.
I have two stacks residing in the same folder. One is destined to be the application stack. It is simply a means to navigate to the second stack.The second is destined NOT to be a substack.
When I open the first stack, it is it's own mainstack as it should be. When I navigate to the second stack, the inspector says it is a substack of the first stack.
If I click "make Mainstack" it does change to be it's own mainstack.Ok.
Now when I try to save the second stack, windows asks me if I want to replace that stack. Click yes,save and exit.
Now I cannot navigate to the second stack from the first stack.
Instead, I get this error from LC:
Handler: error in statement
Field
go stack "Jukebox2"
mouseup
I have uninstalled and reinstalled LC twice while battling this.
-
- Livecode Opensource Backer
- Posts: 9476
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: LC makes my stack a substack
OK, OK: probably I am being a bit stupid as usual, so please could you explain HOW you open the second stack from the first stack?
- -
As THAT does something very odd indeed:
- -
I have NO idea what that stack "revCo..." is.
This, on the other hand works perfectly, with no nonsense about stack "Stack TWO" being a substack of anything:
-
- -
As THAT does something very odd indeed:
- -
I have NO idea what that stack "revCo..." is.
This, on the other hand works perfectly, with no nonsense about stack "Stack TWO" being a substack of anything:
-
-
- VIP Livecode Opensource Backer
- Posts: 9785
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: LC makes my stack a substack
Hi.
So you want two stacks, the first being your "splash" stack and the second being your "working" stack (or stacks).
Make sure that each resides in its own separate stack file. Each must live that way. If they are currently not, change them.
Craig
So you want two stacks, the first being your "splash" stack and the second being your "working" stack (or stacks).
Make sure that each resides in its own separate stack file. Each must live that way. If they are currently not, change them.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 7266
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: LC makes my stack a substack
There is no syntax error in the reported statement. Can we see the whole handler that opens the second stack?
It may be that LC is looking for the stack in the defaultfolder, which is normally LC's application folder. But in that case I'd expect a "can't find stack" error.
It may be that LC is looking for the stack in the defaultfolder, which is normally LC's application folder. But in that case I'd expect a "can't find stack" error.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: LC makes my stack a substack
It is a simple mouseup handle.
Code: Select all
on mouseup
go stack "jukebox"
end mouseup
-
- VIP Livecode Opensource Backer
- Posts: 9785
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: LC makes my stack a substack
@oldDummy.
What is different, apart from the name, between:
and:
??
Craig
What is different, apart from the name, between:
Code: Select all
go stack "Jukebox"
Code: Select all
go stack "Jukebox2"
Craig
-
- VIP Livecode Opensource Backer
- Posts: 7266
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: LC makes my stack a substack
When you made the substack into a mainstack, did you also save the original mainstack? If not, then the substack may still be there. I believe LC moves the substack out to a new mainstack and deletes the one embedded in the first mainstack, but if you don't save it the substack will remain.
Try this:
Check that you have a stack "Jukebox.livecode" in the same folder.
Use the project browser to confirm the substack still exists in the first mainstack. If so, delete it.
Save the mainstack.
Close and remove it from memory [in the File menu]
Reopen the mainstack.
Change the field handler to: go stack "Jukebox.livecode"
Try the handler again.
If that still doesn't work then LC is probably looking in the wrong folder. Add an openStack handler in the main splash stack:
Save the mainstack,, close and remove from memory, and then reopen it and try the handler again.
Try this:
Check that you have a stack "Jukebox.livecode" in the same folder.
Use the project browser to confirm the substack still exists in the first mainstack. If so, delete it.
Save the mainstack.
Close and remove it from memory [in the File menu]
Reopen the mainstack.
Change the field handler to: go stack "Jukebox.livecode"
Try the handler again.
If that still doesn't work then LC is probably looking in the wrong folder. Add an openStack handler in the main splash stack:
Code: Select all
on openStack
set the defaultfolder to specialFolderPath("resources")
end openStack
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: LC makes my stack a substack
The jukebox and jukebox 2 issue was just me experimenting with saving the stack as a different name and then exchanging it with the existing stack with a change in the go stack script.
That did not work either.
I believe I've tried adding the .livecode to the name but I will try it to make sure.
Thanks folks.
That did not work either.
I believe I've tried adding the .livecode to the name but I will try it to make sure.
Thanks folks.
-
- Livecode Opensource Backer
- Posts: 9476
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: LC makes my stack a substack
Just to be awkward, and return to the original posting:
Why can't one of the stacks be a substack of the other one?
Why can't one of the stacks be a substack of the other one?
-
- VIP Livecode Opensource Backer
- Posts: 9785
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: LC makes my stack a substack
Richmond.
Unless any stacks apart from the executable stack are in separate stack files, they won't save changes. Substacks don't cut it.
Craig
Unless any stacks apart from the executable stack are in separate stack files, they won't save changes. Substacks don't cut it.
Craig
-
- Livecode Opensource Backer
- Posts: 9476
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: LC makes my stack a substack
Mind you, you can save data to, say, a text file.
-
- VIP Livecode Opensource Backer
- Posts: 9785
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: LC makes my stack a substack
Yep, that is the "other" way to do it, likely a favorite for many. I like the splash method.Mind you, you can save data to, say, a text file.
Craig
Re: LC makes my stack a substack
I am going to trash it all as I feel somehow I have corrupted it. My intention now is simple to remake them both and copy every script and object to make another pair of stacks and try the build again.
Thank you all for your suggestions!
Thank you all for your suggestions!
-
- VIP Livecode Opensource Backer
- Posts: 7266
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: LC makes my stack a substack
I suspect the problem isn't corruption, but if the new stacks fail in the same way then I'd be happy to take a look at them and see if I can find the problem. Or send them now if you want to avoid reproducing everything.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 9785
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: LC makes my stack a substack
oldDummy.
I agree with Jacque, it is not a corruption thing. Somehow it is a problem with LC "finding" the other stack. Currently, are you certain that your mainStack and your "other" stack are both mainStacks, and each live their own stack files? And this would not matter until you create a standalone.
But in the IDE, it should not matter. You might try re-creating that second stack from scratch with a new name, and see if you can navigate to it.
Craig
I agree with Jacque, it is not a corruption thing. Somehow it is a problem with LC "finding" the other stack. Currently, are you certain that your mainStack and your "other" stack are both mainStacks, and each live their own stack files? And this would not matter until you create a standalone.
But in the IDE, it should not matter. You might try re-creating that second stack from scratch with a new name, and see if you can navigate to it.
Craig