Error Cannot See A Visible Substack

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
joyocow
Posts: 1
Joined: Thu Jul 25, 2024 8:49 am
Contact:

Error Cannot See A Visible Substack

Post by joyocow » Thu Jul 25, 2024 9:08 am

Hello everyone, I'm a new member

My stack has a button that allows me to show or conceal a substack that contains my app settings. When I first established the substack, the "show/hide" option functioned properly. I stopped LiveCode and returned to my project the following day. No matter what I do, I can't see the "Settings" substack. The message box indicates that it is visible and at a position where I should be able to see it. The height and breadth are accurate, but the substack is not visible, despite the live code indicating that it is.

I have four (4) controls in this substack. I can send a "mouseUp" to each of them, and the scripts make the appropriate adjustments to the main stack.

I erased the substack, established a new one, and everything worked perfectly. I saved my project, closed LiveCode, and reopened it. The exact same thing occurred again.

Any assistance would be appreciated.

Thanks,

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10076
Joined: Fri Feb 19, 2010 10:17 am

Re: Error Cannot See A Visible Substack

Post by richmond62 » Thu Jul 25, 2024 10:18 am

Is it possible that there is some script in your main card that is hiding the substack?

ALSO: when one opens a stack, any substacks do not automatically open on the desktop, if you want your substack to show up when you open your main stack you will have to tell LiveCode to open it in the openStack script of your main stack a bit like this:

Code: Select all

on openStack
    open stack "mySubStack"
    set the visible of stack "mySubStack" to true
end openStack

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

Re: Error Cannot See A Visible Substack

Post by dunbarx » Thu Jul 25, 2024 2:03 pm

Hi.

You are saying that your project worked perfectly and all you did was to quit LC (I assume everything was saved), reopen and the subStack would not appear? Is your stack available to post? If not, can you empty it of anything you do not want public and then post?

And if you agree, you will need to make, I think, ten other posts beforehand in order to qualify to post your file. Do that, and we will ignore them. Note that your stack file must be compressed in order to post it.

Craig

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10076
Joined: Fri Feb 19, 2010 10:17 am

Re: Error Cannot See A Visible Substack

Post by richmond62 » Thu Jul 25, 2024 2:23 pm

Do that, and we will ignore them.
That could be seriously misinterpreted.

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

Re: Error Cannot See A Visible Substack

Post by dunbarx » Thu Jul 25, 2024 3:48 pm

Gee, I hope Joyocow understands.

Joyocow, we promise not to ignore you once you pass the minimum posting limit. Just use the title "Test" for the next nine.

Craig
Last edited by dunbarx on Thu Jul 25, 2024 7:26 pm, edited 2 times in total.

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

Re: Error Cannot See A Visible Substack

Post by jacque » Thu Jul 25, 2024 5:49 pm

Visibility is a property of the stack and it will apply whether the stack is open or not. It has to be opened or shown before you actually see it. The visible of a stack is true by default so generally you don't need set it. Instead use "go" or "open" to bring it into focus where you can see it. Richmond provided an example of this.

Generally all you need is one line:

Code: Select all

go stack "settings" 
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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

Re: Error Cannot See A Visible Substack

Post by dunbarx » Thu Jul 25, 2024 7:26 pm

The OP stated that the subStack worked properly until LC was closed and then did not work in the new session. And this happened again with a rebuild of the subStack. Assuming there are no handlers somewhere that explicitly hide it, the very correct posts by Richmond and Jacque should not be pertinent.

I get that this all assumes we think we know what is going on here. :roll:

Anyway, joyocow, can you see what we are getting at? Frankly, I will bet that your project is doing this to itself; we just have to find where.

Craig

andresdt
Posts: 156
Joined: Fri Aug 16, 2019 7:51 pm
Contact:

Re: Error Cannot See A Visible Substack

Post by andresdt » Thu Jul 25, 2024 7:28 pm

Hi, other than making sure your substack is made visible. You can also make sure it is within the visible area of ​​the screen.

Code: Select all

set the loc of stack "settings" to screenLoc() // OR --> the loc of stack (main stack "settings" stack)
show card 1 of stack "settings"
Be kind, we all have our own wars.
https://torocruzand.com/

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

Re: Error Cannot See A Visible Substack

Post by dunbarx » Thu Jul 25, 2024 9:17 pm

Andre.

The OP writes:
The message box indicates that it is visible and at a position where I should be able to see it. The height and breadth are accurate, but the substack is not visible, despite the live code indicating that it is.
Seems to cover that, but we still need more definitive info.

Craig

andresdt
Posts: 156
Joined: Fri Aug 16, 2019 7:51 pm
Contact:

Re: Error Cannot See A Visible Substack

Post by andresdt » Thu Jul 25, 2024 10:48 pm

:idea: Some other things that would be nice for the OP to check. Just to rule out that it is not an unwanted value of any of the following properties.

Code: Select all

set the blendLevel of stack "settings" to 0
set the windowShape of stack "settings" to 0
Be kind, we all have our own wars.
https://torocruzand.com/

stam
Posts: 3060
Joined: Sun Jun 04, 2006 9:39 pm

Re: Error Cannot See A Visible Substack

Post by stam » Fri Jul 26, 2024 9:24 pm

Failing a successful outcome based on the excellent advice above, if the issue persists please consider zipping it and sharing it directly on the forum. It may be easier to troubleshoot rather than trying to imagine what the issue is...

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10076
Joined: Fri Feb 19, 2010 10:17 am

Re: Error Cannot See A Visible Substack

Post by richmond62 » Fri Jul 26, 2024 9:46 pm

My nasty mind questions the reality of joyocow.

Or, as my late father used to say when he felt that things were going logically wonky, "How now, brown cow?"

I'm certainly waiting for the cows to come home. 8)

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Re: Error Cannot See A Visible Substack

Post by SparkOut » Sat Jul 27, 2024 9:23 am

I'm wondering several things, but a couple of wonderings are around cleanup scripts on shutdown which might have done something to cause this, or my main suspicion is an openStack or preOpenStack handler in the main stack's stack script. If the substack opens but does not have its own openStack handler, this will be passed to the mainstack and trigger that (possibly hiding the substack). For this reason it's often recommended to put these handlers intended only for the mainstack into the card script of card 1

Post Reply