Dates for REAL World ‘09

Posted on April 10, 2008 
Filed Under REALbasic Tutorial | 1 Comment

REAL Software just sent out a newsletter and listed the dates of next year’s REAL World conference:

May 4-6, 2009

It’s cool that we know so far ahead of time…

…but it’s MORE than a whole year away! =:(

Well, make plans for it now — I’d like to meet you there!

Jay

My First Yuma Sample

Posted on April 6, 2008 
Filed Under REALbasic Tutorial | 3 Comments

I figure that since Yuma is REALbasic under the hood (kind of ) that it should be fair game for this blog. =:)

This morning, instead of going to bed like I ought, I stayed up and wrote my first Yuma code. It’s very simple, just opens a SQLite database and reads in some data, then prints it to the web page. No classes, functions, etc, just some straight-ahead code.

Here’s the first chunk of Yuma code that goes at the top of the page:

<?yuma
    dim srdata as SQLiteDatabase
    dim rs as RecordSet
    dim cnct as Boolean
    dim articles() as String

    srdata = New SQLiteDatabase

    srdata.DatabaseFile = GetFolderItem("aa.rsd")
    cnct = srdata.Connect
    rs = srdata.SQLSelect("select title from articles")
    while not rs.eof
        articles.Append rs.Field("title").StringValue
        rs.MoveNext
    wend
    srdata.Close
?>

One thing I want to mention right off the bat is this is NOT the way to write code — there’s no error- checking. But I wanted to make it as short as possible just to showcase the “good stuff.”

Just like regular RB code, you dimension your variables ahead of time, then create a FolderItem for the aa.rsd file, connect to the database, and finally get a RecordSet as the result of a SQL select statement.

Oh, the other thing I did there was instead of just printing out the data, I used Array.Append to fill the articles() array with the data — we’ll use it in the second chunk of code.

Here’s the second (and last) chunk of code — it’s the main part of the actual HTMP page:

<html>
<head><title>Yuma Database Sample</title></head>
<body>
    <p>
    <?yuma      
        dim x, numArticles as Integer
        numArticles = UBound(articles)
        for x = 0 to numArticles
            print str(x+1) + ". " + articles(x) + "<br/>"
        next
    ?>
    <p/>
</body>
</html>

Right inside the body of the page we have another Yuma code block that simply finds out how big the articles() array is and then loops over it to print the data to the screen.

That block of code is in just about the simplest HTML page you can create, but there’s nothing stopping it from being inside a big honkin’ prettified web page.

Just for the fun of it, you could even do something like this — break the block up so that it loops over the rows of a table:

<table width="600">
<?yuma      
    dim x, numArticles as Integer
    numArticles = UBound(articles)
    for x = 0 to numArticles
?>
    <tr>
        <td>
        <?yuma print str(x+1) + ". " + articles(x) + "<br/>" ?>
        </td>
    </tr>
<?yuma next ?>
</table>

Notice the “next” part of the for loop is in a different chunk of Yuma code — it doesn’t care, it still knows it belongs with the code above.

Put those two chunks of code on one .yuma page, make sure you have a database file called aa.rsd containing a table called articles and a column called title, and you’re in business!

If you haven’t download the development version of Yuma, get to it — it’s free and cross-platform.

I really wish I’d had Yuma last fall when I was porting a bunch of my REALbasic desktop apps to PHP. That silliness is going to stop now! =;)

More Money for REALbasic Programmers

Posted on March 29, 2008 
Filed Under REALbasic Tutorial | Leave a Comment

I put together a special report that went along with the presentation I gave at REAL World 2008 last week in Austin, Texas. That report is now available — and you can download it whether you went to RW ‘08 or not.

Programming Profits

If you’re interested in a way to make more money than just the traditional freelance programming route, you should get that special report.

ListBox Hover Cell

Posted on March 25, 2008 
Filed Under REALbasic Tutorial | 2 Comments

Here’s another REALbasic tip that could make your listboxes better…

Someone from the RB Forum asked how to know when the mouse is over the cell in a listbox. They wanted to show the original value in a static text as the mouse hovers over the cells in a certain column.

That’s a screenshot of the example program I put together that shows how to accomplish that (the cursor didn’t show in the screen capture, but it’s there pointing at the cell showing Eleven).

I did change the original poster’s requirements, though — I made a window that hovers show up rather than just putting the info in a static text control.

The “magic” that allows this to happen is ListBox.RowFromXY and ListBox.ColumnFromXY — it’s not rocket science after all! =:)

You can grab the sample source code for this REALbasic tutorial from here:

http://rbnation.com/files/ListBoxHoverCell2.zip

And then look in the ListBox.MouseMove event for the code to see what’s happening.

There have been times when I’ve wanted this kind of functionality, but never took the time to see what it would take to make it work. Who knew it would be so easy? =;)

Jay Jennings

PS - No video with this one, but more REALbasic tutorial videos are on the way.

Technorati Tags: ,

REAL World 2008

Posted on March 22, 2008 
Filed Under REALbasic Programming, REALbasic Tutorial | Leave a Comment

This isn’t a “wrap-up” or anything like that — I’m too wiped out to do that right now. But I will be posting more information about the conference that just ended a few hours ago.

Honestly, the only reason I came was due to winning the Speaker Contest REAL Software held — but now that I’ve seen what REAL World is all about, I’m kicking myself for not coming last year, and the year before, and…

I’m already planning on coming back next year.

There were some really good sessions but the absolute best part was meeting some of the best RB developers around the world — and the RS employees. I’d met Mars Saxman about 10 years ago (before RS existed) but it was nice seeing him again — and great meeting a lot of the RS people I only knew of as names in emails or in the forum.

One of the things this conference did was to light a fire under me and get some more REALbasic tutorial videos done — I have a list right now that I’m going to start working my way through as soon as I get back home on Monday.

So keep an eye on this spot — cool REALbasic code and stuff coming soon!

Jay Jennings

REALbasic Listbox - Drag-and-Drop

Posted on January 29, 2008 
Filed Under REALbasic Tutorial | Leave a Comment

Doing drag-and-drop between two listboxes is pretty easy with REALbasic — just use the sample code in the Language Reference manual. But if you want to drag and drop rows that have multiple columns, you’re going to need to add a little more code.

This video shows how easy that can be, and also takes a look at NthField and CountFields, two cool features in RB.

Multicolumn Listbox Dragging (link opens a new window)

REALbasic Custom Controls

Posted on January 27, 2008 
Filed Under REALbasic Tutorial | Leave a Comment

In the interest of helping people create better-looking RB applications, I’m going to put together a list of custom controls….

Wait a second, that’s kind of what RBGarage is, isn’t it?

Hmmm…I guess what’s missing there is a way to see the controls without going to each site and downloading the demos. I like what Einhugur does — he shows actual pics of the controls so you can get a grasp of what it does for you right off the bat.

So, maybe there’s an opening for something that would “extend” RBGarage…

Any ideas?

REALbasic Timer Controls

Posted on January 4, 2008 
Filed Under REALbasic Tutorial | Leave a Comment

Someone on the RB Forums asked about using timers to control the coloring of some squares (what for, I have no idea). So I put together a sample that shows how I’d do it.

There’s a six minute video detailing how to use REALbasic Timer Controls in your program.

Jay Jennings

tags technorati :

REALbasic Database Tutorial

Posted on January 1, 2008 
Filed Under REALbasic Tutorial | 28 Comments

Here’s a video tutorial that will walk you through View, Insert, Update, and Delete records in REALbasic using the RealSQL database:

REALbasic Database Video Tutorial

I put this together because the docs about DB use in RB seem to be a little lacking — at least for me.

Jay Jennings

tags technorati :

REAL World Speaker Contest: Entry

Posted on January 1, 2008 
Filed Under REALbasic Tutorial | Leave a Comment

Here’s a link to my entry in the REAL World Speaker competition:

http://www.youtube.com/watch?v=7_xDKvBjW3I

As soon as the voting is enabled on the RealSoftware web site I’ll send out a link — and will appreciate your vote!

Next Page →