Article Preview
Buy Now
COLUMN
Swatter Part 5
A simple bug database
Issue: 6.6 (September/October 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): 16,363
Starting Page Number: 46
Article Number: 6617
Resource File(s):
6617.zip Updated: 2008-09-01 13:52:19
Related Link(s): None
Excerpt of article text...
Today we wrap up work on Swatter, our simple bug database. We've done a lot of work on Swatter so far, including building the interface, creating our database, and writing most of the code. Now we're going to look at the Populate and UpdateRecord methods in IssueEntryWindow and we'll discuss some possible future improvements.
Populating IssueEntryWindow
Before we can edit an existing issue, we need to have a way to get its data into IssueEntryWindow. We'll do this using the Populate method that we created. If you recall (or really, even if you don't), Populate takes two parameters: RecordID as Integer and ProjID as Integer. RecordID is, of course, the unique number that identifies our issue inside the database. ProjID is the unique number that identifies our project in the database. We'll need both.
Before we get to the code in that method, we need to solve a problem. In IssueEntryWindow, we have five PopupMenus, and we'll need to set a value in each of them. Here's the problem: REALbasic doesn't give us a way to set the text in a PopupMenu. We can only set the ListIndex. Fortunately, this is easy to work around, and if you've never encountered this issue before, what follows is a great little tool to have in your utility belt. So let's take a very brief side trip.
...End of Excerpt. Please purchase the magazine to read the full article.