Skip to main content
Question

Toggling visibility variable instead toggles the other visibility two variables

  • January 17, 2025
  • 1 reply
  • 19 views

odysseum_

Currently making a prototype for book reserving.

 

Upon clicking check in, it’s supposed to toggle a variable checkActive to true.

 

It’s supposed to look like this

 

but instead it toggles the two other windows from some reason?

 

 

What’s the issue here when I have affixed the appropriate variables to each window’s visibility?

 

1 reply

Avokadomos
  • Active Member
  • 377 replies
  • January 17, 2025

Your logic has errors. Assuming they are all false in the beginning, your click interaction will resolve the variables as follows:

  • checkActive == true resolves to false
  • booksearchActive == false resolves to true
  • patronsearchActive == false resolves to true

When you use ==, it’s a statement that can be true or false, so something == true becomes “something equals to true”, which is false in your case.

What you want to do instead is just to set them to true or false respectively.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings