Using a Menu Item To Change a Variable?

Basically, I have my variable and I want to change its value when I press a button in the file menu. I have the button, and thats as far as I got. Any help?

You’ll want to add a menu handler to the Window.

I recommend reviewing chapter 2.15 (Menus) in User Guide Book 2: User Interface.