Article Preview
Buy Now
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.