Skip to main content

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?

 

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