Article Preview
Buy Now
FEATURE
The Extends and Assigns Keywords
Issue: 2.1 (August/September 2003)
Author: Charles Yeomans
Author Bio: Charles Yeomans pontificates about most things REALbasic from his computer in Lexington, Kentucky.
Article Description: No description available.
Article Length (in bytes): 16,809
Starting Page Number: 21
Article Number: 2111
Resource File(s):
2111.zip Updated: 2013-03-10 14:52:36
Related Link(s): None
Excerpt of article text...
REALbasic 5.1 introduced two new keywords, "Extends" and "Assigns," that allow developers to do wonderful things. In this article, we'll explore their use by way of examples, and also take a look at the benefits of their introduction for application design in REALbasic.
The Extends Keyword
The "Extends" keyword allows you to add new subroutines and functions to an existing class. It does this by telling the compiler to treat global methods as methods of the declared type of the first parameter. Some examples will make this clear.
Examples
As our first example, let's add a HexDump function to the MemoryBlock class.
...End of Excerpt. Please purchase the magazine to read the full article.