Article Preview
Buy Now
COLUMN
Control Panel Library
Switch Class
Issue: 4.1 (September/October 2005)
Author: Joe Nastasi
Author Bio: Joe Nastasi is the president of Pyramid Design, the developers of A-OK! Spacecraft Simulation System and FTP Suite.
Article Description: No description available.
Article Length (in bytes): 11,051
Starting Page Number: 36
Article Number: 4117
Related Link(s): None
Excerpt of article text...
In this installment of Topographic Apprentice, we'll take a look at the SwitchClass. But the big news is that the demo program is now on the REALbasic Developer web site, so download it and start trying out the library!
SwitchClass
The SwitchClass is very similar to the IndicatorClass in that it uses 2D pictures, stored as shapes, to represent each switch position. These change by changing the Shape property to reflect the current switch state. The key is how it knows that the state has changed. More on that later.
Earlier in the series, I mentioned using RBScript for switches. As it turns out, testing for the switch status in the simulation or game loop is simpler and all that is required for most applications.
Properties
Height as Integer - A local property that contains the height of the indicator.
...End of Excerpt. Please purchase the magazine to read the full article.