I guess I have been staying up to late and can no longer afford to pay attention . . . .
I don't see a need to pass parameters, as this toggleButton procedure is just calling another global procedure, so it works well as it stands.
Because of that, there is no need to make the script call the joint orient proc, it is good as it stands. My coding was good, but my analysis of it afterward was flawed . . . .
I usually go to bed around 12:00pm, but some nights I wake up at about 2:00AM, and then stay up coding or goofing around till about 4:00AM, then go back to bed and get up at about 8:30, go to work at 9:45 on the days I work and get home about 10:30PM . . . . goofy scedule but I like it.
I guess what is important is that you DO have to have particular commands for each click of the button if you are going to create a toggle button, and most likely you would want the commands to invoke another procedure. The code should be good enough as an example for anyone who wants to create one for their own purposes.
"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche