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 6.3

FEATURE

Introducing Introspection

REALbasic 2008r1 takes up Navel-Gazing

Issue: 6.3 (March/April 2008)
Author: Andy Dent
Author Bio: Andy is a multi-language developer of 25+ years' experience from Perth, Western Australia. He works in REALbasic as his language of choice for cross-platform user interfaces. His experience with other cross-platform development includes writing in Flash, Java, and many years of C++ including developing his own portability solution - PP2MFC.
Article Description: No description available.
Article Length (in bytes): 9,056
Starting Page Number: 13
Article Number: 6309
Resource File(s):

Download Icon 6309.zip Updated: 2008-03-15 12:35:19

Related Link(s): None

Excerpt of article text...

Introspection is basically a way for a programming language to be able to tell the same things about the program that you can from looking at the source code. It is the major new feature of RB2008r1 and opens the way for improved tools, web frameworks, and gives you more choices in your programming style.

How Introspection Was Added

Rather than extending the Object class, which might occur to some people, Introspection was added as a new Module containing a few methods that can act on any data type. This is a very REALbasic-ish approach and applies the philosophy that RB is not just an object-oriented language but has other data types and containers for functions. Following the recently introduced use of modules as namespaces that contain other modules and classes, everything is found and used from the Introspection module.

The TypeInfo class is the heart of Introspection and contains many methods. Depending on what you pass in, some will return empty results. It is trivial to get the TypeInfo for any current Object.

...End of Excerpt. Please purchase the magazine to read the full article.