Tidbit for Plugin Developers

| | Comments (4)

If you develop plugins for REALbasic and use the powerful but under-documented dynamic access APIs, then this is a hint for you. If you need to call a method on a superclass from within a plugin, you can use REALLoadObjectMethod to do it for you by prototyping "Super." into the method you want to load.

For instance, let's say you're making an SSLSocket plugin, and you want to call the TCPSocket.Connect function from within the SSLSocket.Connect function. You'd do that like this:

void (*tcpConnect)( REALobject ) = NULL;
tcpConnect = (void (*)(REALobject))REALLoadObjectMethod( someSSLSocketObject, "Super.Connect()" );

Neat, eh?

4 Comments

I'd still like to see a good article on how to write plugins (including how to prototype C/C++ functions relative to their RB equivalents and how to tap into objects, especially data structures like trees) on RBLibrary.

I was looking at wrapping a dll into a plugin (libogg), but I found all the documentation either unclear, or outdated. Maybe I just don't do much with C++ to know what I should be doing.

There basically is no documentation on how to write plugins in REALbasic. There are docs there, but they were written many years ago when the programming paradigm was entirely different.

I wouldn't mind writing an article or two for RBLibrary on how to write plugins for REALbasic.

For RB to 'grow up' the documentation has to be complete. Frankly, I'm disgusted at the lack of current documentation for plugins.

Okay, disgusted is a little strong, but the fact is the documentation is pretty old. It's bad enough for regular RB users. Plugin authors are left on their own.

Maybe Bjorn and Christian should propose what the new documentation should say since they're (about) the only two that make RB plugins other than RS.

Leave a comment

Disclaimer

I'm currently an employee of REAL Software. My blog is mine. The opinions represented in this blog are mine as well and may not represent my employer's opinions. All original material is copyrighted and property of the author.

REALbasic® is a registered trademark of REAL Software, Inc. REAL SQL Server™ and Lingua™ are pending trademarks of REAL Software, Inc. All rights reserved.