Open stack error message
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Open stack error message
Hi,
I have a simple problem.
I am trying to open a substack thru a button as follows:
on mouseUp
put the selectedText of me into openThisStack
go to openThisStack
end mouseUp
When I initiate the mouseUp handler the stack does 'open' but I get the following error:
executing at 3:31:08 PM
Type Handler: error in statement
Object stack list
Line go to substack openThisStack
Hint mouseUp
This is not a standalone stack, FYI.
I've tried changing "go to openThisStack" with "open stack openThisStack" and same result.
Any ideas on how to correct?
Thanks in advance.
I have a simple problem.
I am trying to open a substack thru a button as follows:
on mouseUp
put the selectedText of me into openThisStack
go to openThisStack
end mouseUp
When I initiate the mouseUp handler the stack does 'open' but I get the following error:
executing at 3:31:08 PM
Type Handler: error in statement
Object stack list
Line go to substack openThisStack
Hint mouseUp
This is not a standalone stack, FYI.
I've tried changing "go to openThisStack" with "open stack openThisStack" and same result.
Any ideas on how to correct?
Thanks in advance.
-
- VIP Livecode Opensource Backer
- Posts: 9669
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Open stack error message
Hi.
Has to be a little glitch in the matrix.
What happens if you explicitly go to the stack listed in the text. That is, write it out by hand (do not copy from whatever source you extract that pathname from) and execute. If it goes, there is something in the stored text. If it gives the same error, there is something in the pathName.
Write back with what you discover.
Craig Newman
Has to be a little glitch in the matrix.
What happens if you explicitly go to the stack listed in the text. That is, write it out by hand (do not copy from whatever source you extract that pathname from) and execute. If it goes, there is something in the stored text. If it gives the same error, there is something in the pathName.
Write back with what you discover.
Craig Newman
Re: Open stack error message
Thanks Craig,
I tried as you suggested
open stack "stack name"
and same result.
The handler is actually in a list field.
I checked the var and it is correct. The correct text is in the var (checked text and num of chars to be sure it was correct).
The correct stack does open with the error, so that is odd. But I am only a rookie.
I'll just keep plugging away at the rest of the stack.
Thanks again.
John
I tried as you suggested
open stack "stack name"
and same result.
The handler is actually in a list field.
I checked the var and it is correct. The correct text is in the var (checked text and num of chars to be sure it was correct).
The correct stack does open with the error, so that is odd. But I am only a rookie.
I'll just keep plugging away at the rest of the stack.
Thanks again.
John
-
- VIP Livecode Opensource Backer
- Posts: 9669
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Open stack error message
Can you (pseudo):
??
Craig
Code: Select all
get the pathName of the stack of interest, using the "Answer File" command.
go stack it.
Craig
Re: Open stack error message
Craig,
Well, since they are substacks I can not navigate to them with the 'answer file'
Thanks.
John
Well, since they are substacks I can not navigate to them with the 'answer file'
Thanks.
John
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: Open stack error message
If you do it from a button then the selectedText becomes empty if the button is not a menu button ...
shiftLock happens
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Open stack error message
The error message indicates that somewhere you have an object named "stack list" that has a handler containing invalid syntax. The incorrect statement is "go substack", which should be just "go stack" (or alternately, "open stack").
It sounds like the list field has a handler that tries to go to the substack and you've created a button that does the same thing. Clicking the list field triggers the error.
It sounds like the list field has a handler that tries to go to the substack and you've created a button that does the same thing. Clicking the list field triggers the error.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Open stack error message
So I know, as I reread the messages, I am not very clear.
I have a 'splash stack' - an main stack that opens and then should open a substack:
on openStack
put the substacks of this stack into allsubstacks
put allsubstacks into field "Stack List" -- this puts all the substacks in a list field so I can open them as I develop the substacks by clicking on them in the field.
open stack "Notes" -- this should 'open' the substack 'Notes', and it does, with the error ....
end openStack
interestingly I also get the error when using the message box - although the stack opens.
I check firewall settings too.
thanks for all your replys.
John
I have a 'splash stack' - an main stack that opens and then should open a substack:
on openStack
put the substacks of this stack into allsubstacks
put allsubstacks into field "Stack List" -- this puts all the substacks in a list field so I can open them as I develop the substacks by clicking on them in the field.
open stack "Notes" -- this should 'open' the substack 'Notes', and it does, with the error ....
end openStack
interestingly I also get the error when using the message box - although the stack opens.
I check firewall settings too.
thanks for all your replys.
John
-
- VIP Livecode Opensource Backer
- Posts: 9669
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Open stack error message
Jacque's point about the syntax error is important. But in your orignial post, you did not say "go to substack...", though when you presented the error text, it did indeed have that extra word.
That word is not a native word.
But the result of the "substacks" property is just a list of stack names, and that list is loaded into the field. So how did that extra word get into the fray?
Craig
That word is not a native word.
But the result of the "substacks" property is just a list of stack names, and that list is loaded into the field. So how did that extra word get into the fray?
Craig
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Open stack error message
Use LC's "Find and Replace" tool in the Edit menu. Put "go to substack" into the search field and uncheck all the boxes except for "Script". Do a search. It should list where the incorrect syntax is, and if you double-click the error line the script will open so you can correct it.
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: 474
- Joined: Thu Sep 04, 2008 6:23 am
- Location: Melbourne Australia
Re: Open stack error message
You wrote:
Having a splash stack that has sub stacks doesn't achieve this as substacks are all part of the same stackfile as the main stack (or spalsh stack,in this context) and would have the same limitations placed upon them as the splash stack in a standalone, namely nothing could be changed in them.
So, can I ask why you are using a "splash stack"?
If it is not for the usual reason I have outlined, which would not use substacks, is it just to have a very different initial screen display before your app opens proper, so different it just couldn't be a card of your main stack'?
James
I am intrigued as the use of a 'splash stack', as I have understood it, was to enable modification of the other main and supporting stacks in a standalone as only the 'splash stack' becomes part of the executable and thus not modifiable whereas the other stacks just form part of the package.I have a 'splash stack' - an main stack that opens and then should open a substack
Having a splash stack that has sub stacks doesn't achieve this as substacks are all part of the same stackfile as the main stack (or spalsh stack,in this context) and would have the same limitations placed upon them as the splash stack in a standalone, namely nothing could be changed in them.
So, can I ask why you are using a "splash stack"?
If it is not for the usual reason I have outlined, which would not use substacks, is it just to have a very different initial screen display before your app opens proper, so different it just couldn't be a card of your main stack'?
James
Re: Open stack error message
So I think the whole issues was that there must be some problem with the firewall since I do not get this error on other comupters.
I did replace the word substack
I am using substacks/splash stack so I can save files in a standalone.
Thanks for the help.
Sorry I was not entirely clear.
John
I did replace the word substack
I am using substacks/splash stack so I can save files in a standalone.
Thanks for the help.
Sorry I was not entirely clear.
John
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Open stack error message
I think this may be a common misuse of the word "substack". In LC, a substack is part of the same file on disk and will not allow changes to be saved. If a splash stack is saved as the standalone and then opens other mainstacks, those mainstacks can be saved because they are not actually part of the standalone, they are independent stack files.
Some users call any stack that a standalone opens a "substack" but that isn't always correct. If the stack isn't in the same file, it isn't a substack.
However, there is an option in standalone settings that separates substacks from the mainstack when the app is built, causing all existing substacks to be removed from the file and recreated as independent mainstacks. In this case, the stacks are substacks during development but mainstacks in a standalone. That might be happening here.
Some users call any stack that a standalone opens a "substack" but that isn't always correct. If the stack isn't in the same file, it isn't a substack.
However, there is an option in standalone settings that separates substacks from the mainstack when the app is built, causing all existing substacks to be removed from the file and recreated as independent mainstacks. In this case, the stacks are substacks during development but mainstacks in a standalone. That might be happening here.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Open stack error message
Jacque,
Thanks for your reply.
The eye sees only what the mind is ready to see... I think is 'kinda' the quote
I see my mistakes with the term 'substacks' and this is why changing to a 'stand alone' - i get errors!
I am not a professional coder, so i appreciate the education.
Wow. Thanks.
John.
Thanks for your reply.
The eye sees only what the mind is ready to see... I think is 'kinda' the quote
I see my mistakes with the term 'substacks' and this is why changing to a 'stand alone' - i get errors!
I am not a professional coder, so i appreciate the education.
Wow. Thanks.
John.
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Open stack error message
I am reminded of somthing Mark Wieder posted once, which I thought was not only very funny but also accurate: "I'll see it when I believe it."The eye sees only what the mind is ready to see... I think is 'kinda' the quote
For what it's worth, the "substack" terminology is a very, very common cause of confusion for new LiveCoders. Just about everyone has to figure it out at some point. The idea of having several apparent "files" glued together into a single file on disk is fairly obscure.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com