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 18 in printed book and digital formats -- plus a one-year subscription (beginning with 19.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 6.3

COLUMN

Swatter Part 2

A simple bug database

Issue: 6.3 (March/April 2008)
Author: Brad Rhine
Author Bio: Brad Rhine is the developer of Kodiak, a complete student information system written entirely in REALbasic. That's his day job. In his spare time, he writes shareware applications in REALbasic.
Article Description: No description available.
Article Length (in bytes): 9,576
Starting Page Number: 36
Article Number: 6316
Resource File(s):

Download Icon 6316.zip Updated: 2008-03-15 12:36:08

Related Link(s): None

Excerpt of article text...

In this issue, we continue Swatter, a simple bug database. Last time, we began by discussing a bit about databases and proceeded to define our database structure, or schema, using SQL. I hope you still have the SQL files we created last time handy, because we're about to create our project file and build our interface.

Go ahead and fire up REALbasic, and create a new project. We'll call it Swatter. It's a good idea to create a folder to hold the project file and our SQL files, just so we have everything in one place and we always know where everything is. Once your project is created, we can begin to build our interface.

Based on the tables we defined last time (projects, users, and issues), we have six basic functions to cover, which we'll handle in five windows. Now, the more mathematically inclined among you may be wondering how I started with three tables, arrived at six functions, and decided on five windows. It's pretty simple, really. Each of our three tables has two functions: displaying and data entry. We also have deleting data and editing data, but as you'll see shortly, we can handle those along with displaying and entering data.

The Main Window

Our main, and default, window for Swatter should have two ListBoxes on it. One will list our projects, and the other will list open issues for each selected project.

I made the window 600 pixels wide and 400 pixels, but you may choose to size it differently, and that's fine. As long as you can see the data you need to see, you have a lot of leeway with window and control sizes. I gave the window the name "MainSwatterWindow" and assigned "Swatter" as its title.

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