Article Preview
Buy Now
| PDF: |
From Scratch
Swatter Part 5
A simple bug database
Issue: 6.6 (September/October 2008)
Author: Brad Rhine
Article Description: No description available.
Article Length (in bytes): 15,122
Starting Page Number: 46
RBD Number: 6617
Resource File(s):
6617.zip Updated: Monday, September 1, 2008 at 2:44 PM
Related Link(s): None
Known Limitations: 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.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|







