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 7.2

COLUMN

Converting REALbasic Code to Yuma

Issue: 7.2 (January/February 2009)
Author: Brad Weber
Author Bio: Brad Weber is a co-founder of Inspiring Applications, Inc. and has enjoyed 13 years of building custom software applications for Macintosh, Windows, and the web.
Article Description: No description available.
Article Length (in bytes): 5,989
Starting Page Number: 50
Article Number: 7215
Related Link(s): None

Excerpt of article text...

In previous columns I covered web-specific topics like session management and HTML form post validation in Yuma. This time, I thought I'd take the opportunity to remind the REALbasic developers who are reading this publication that your Yuma code will be remarkably similar to your REALbasic code. In fact, we provide a free, open-source utility for you to convert the classes in your current REALbasic framework for use on the web.

For this column, I've created a new REALbasic project and defined a simple class named "address". The class contains five properties-- street, unit, city, state, and zip (my apologies to non-US readers) and one getDisplay method that omits empty lines from an address block for display.

When saving the project, I selected the "Version Control Project" format so that my address class would be saved as address.rbbas in my project directory on disk. (See Figure #1.) Alternatively, I could have saved the project in any format and exported the address class alone in version control format by right-clicking or control-clicking on the class in REALbasic's project window and selecting "Export..." from the contextual menu. (See Figure #2.)

You'll find a "converter" directory in your Yuma download. It contains an open-source "RB to Yuma Converter" REALbasic project. It simply converts .rbbas files to .yuma files. Launch it to see it's single-window interface. (See Figure #3.) For each .rbbas file you drag and drop into the application's window, it will create a matching .yuma file, ready for you to use in your Yuma application.

To take advantage in my Yuma project of the address class I created for this column, I dropped my address.rbbas file (See Code Listing #1.) onto the converter window to get an address.yuma file (See Code Listing #2.). Then, I just need to include that file in an HTML (Yuma) page with Yuma's #include directive:

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