Page 1 of 2

Open stack error message

Posted: Thu Oct 06, 2016 8:36 pm
by jsburnett
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.

Re: Open stack error message

Posted: Thu Oct 06, 2016 9:31 pm
by dunbarx
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

Re: Open stack error message

Posted: Thu Oct 06, 2016 9:48 pm
by jsburnett
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

Re: Open stack error message

Posted: Thu Oct 06, 2016 10:58 pm
by dunbarx
Can you (pseudo):

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

Posted: Thu Oct 06, 2016 11:14 pm
by jsburnett
Craig,
Well, since they are substacks I can not navigate to them with the 'answer file'
Thanks.
John

Re: Open stack error message

Posted: Fri Oct 07, 2016 3:32 am
by [-hh]
If you do it from a button then the selectedText becomes empty if the button is not a menu button ...

Re: Open stack error message

Posted: Fri Oct 07, 2016 3:54 pm
by jacque
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.

Re: Open stack error message

Posted: Fri Oct 07, 2016 4:39 pm
by jsburnett
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

Re: Open stack error message

Posted: Fri Oct 07, 2016 6:19 pm
by dunbarx
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

Re: Open stack error message

Posted: Fri Oct 07, 2016 10:22 pm
by jacque
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.

Re: Open stack error message

Posted: Sat Oct 08, 2016 12:47 am
by jameshale
You wrote:
I have a 'splash stack' - an main stack that opens and then should open a substack
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.

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

Posted: Wed Oct 12, 2016 7:24 pm
by jsburnett
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

Re: Open stack error message

Posted: Wed Oct 12, 2016 7:54 pm
by jacque
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.

Re: Open stack error message

Posted: Sat Oct 15, 2016 6:34 pm
by jsburnett
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.

Re: Open stack error message

Posted: Sat Oct 15, 2016 8:02 pm
by jacque
The eye sees only what the mind is ready to see... I think is 'kinda' the quote
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."

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.