Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 4.1

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.