Introduction to REALbasic Plug-Ins

REALbasic's functionality may be extended through "plug-ins", which are small code libraries written in C or C++. These may include code for 68k Macs, PowerPC Macs, or Windows x86 machines. Plug-ins can define new functions, classes, or controls, which (once installed) appear in REALbasic just like the built-in ones. When the REALbasic user builds a stand-alone application, any plug-in code or resources used are also compiled into that application, so that end users (using just the compiled app) do not need to have the plug-ins on their systems.

Information and Resources

Useful references relating to REALbasic plug-ins include:

About the SDK Version

The version number of this SDK is found in the Version History, and is broken into several parts.

The first two numbers indicate the major and minor numbers of REALbasic for which the SDK was written. So in SDK 2.1.1a4, "2.1" means that the SDK was written for REALbasic 2.1.

The third number (and any alpha/beta number) indicate the revision of the SDK, with respect to the version of REALbasic for which it was written. So in our example of SDK 2.1.1a4, this is revision 1, alpha 4 of the SDK written for REALbasic 2.1.

Writing Plug-Ins

See Writing REALbasic Plug-Ins for general inforamtion on how to create custom classes, functions, interfaces, and controls. This document also contains the Version History for the SDK.

In addition, there is now an API Reference which documents each function in the Application Programmer's Interface -- the set of functions which let your code communicate with the REALbasic engine.

If you've already got a classic MacOS plug-in, and want to make it also work under Mac OS X or Windows, see Targeting New Platforms.

Testing and Debugging

The plug-in can be tested just by dropping it in the plugins folder (in the same folder as the REALbasic application), launching REALbasic, and giving it a try. But during development it will often be helpful to use the CodeWarrior source-level debugger on your plug-in code. To do that, go to the project settings dialog of the target you wish to debug (PPC or 68k), and check the following settings: Next, make sure there's a breakpoint somewhere in your plug-in code. When you turn on debugging and hit cmd-R, CodeWarrior will launch REALbasic, and when it hits the breakpoint, it will switch to the debugger and you'll be able to step through your plug-in code.

(There is currently no way known to use a source-level debugger on x86 plug-in code.)


plugin-intro.html
16 Jun 2000