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 20 in printed book and digital formats -- plus a one-year subscription (beginning with 21.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!

Recent issues

Article Preview


Buy Now

Issue 2.1

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):

Download Icon 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.