Article Preview
Buy Now
COLUMN
iDater, Part 2
A simple project to manage creation and modification dates
Issue: 6.1 (November/December 2007)
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): 7,792
Starting Page Number: 36
Article Number: 6114
Resource File(s):
6114.zip Updated: 2007-11-15 10:34:12
Related Link(s): None
Excerpt of article text...
Today we complete the development of iDater. The purpose of this project is to change the creation and/or modification dates and times on a file or on a batch of files.
Before we get started with more code, we're going to make a minor change to the iDater interface. Where we previously had one EditField for the creation time and one for the modification time, we're going to have three for each. See Figure 1 for an example. I also added a few StaticTexts with nothing but a colon in them to indicate to our users that they are time separators.
The Nuts And Bolts
If you recall from last time, our ListBox is set to accept files via drag and drop or using the BevelButtons we've set up on our window. We can also use the minus button to remove files from the queue. I've also gone through the interface and given meaningful names to our controls. Now we're ready to rock and roll.
Remember that iDater's job is to walk through the list of files and change each one's modification date, modification time, creation date, and creation time. That description tells us that we'll need two date objects (one for each date) and six integers (three for each time: hour, minute, and second) to work with. We'll also need another integer to help us step through the ListBox, as well as two FolderItems. So let's add this code to the Go button's Action event:
Dim CDate, MDate As Date
...End of Excerpt. Please purchase the magazine to read the full article.