Article Preview
Buy Now
| Print: | |
| PDF: |
Beginners Column
Custom Classes
Creating a statictext subclass
Issue: 2.5 (May/June 2004)
Author: Thomas J. Cunningham
Author Bio: Thomas is a hobbyist programmer who enjoys sharing the RB loving with others. He makes his home in the 50th State on the island of Maui.
Article Description: No description available.
Article Length (in bytes): 10,760
Starting Page Number: 28
RBD Number: 2513
Resource File(s):
2513.sit Updated: Friday, May 14, 2004 at 9:59 AM
Related Link(s): None
Known Limitations: None
Excerpt of article text...
Welcome back, newbies! For this month's column I would like to discuss what I consider to be one of the first steps toward becoming an intermediate REALbasic user -- creating and using custom classes. This involves, more often than not, subclassing existing classes.
Classes
First, so we're all on the same page, let's briefly define what it means to be a class. A class is a blueprint, or prototype, that defines the variables and the methods common to all objects of a certain kind.
There are many other descriptions, but this will get us going. While working in the IDE of RB, we are using classes to write our programs. As beginners, we use the classes that come with RB, like StaticText and EditField. One of our first hurdles as beginners is to explore and use these built-in classes. Some classes that you will use are visible, like a StaticText.
Others work behind the scenes and are not visible; a FolderItem is such a class. Both of these classes are designed to do certain jobs, and we really don't have any knowledge of how they do their tasks; this is a good thing. What we do know is that they are available to us as the pieces we use to build a program. They provide us with an interface to use.
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|







