Special

Special Print Closeout!

We're clearing out the remainder of our print issues at fire sale prices -- as much as 75% off! Quantities are extremely limited and only available while supplies last. Hurry to take advantage of this one-time offer.

RBD Magazines

Once these printed back issues are gone, they are gone!

Article Preview


Buy Now

Print:
PDF:

From Scratch

iDater, Part 2

A simple project to manage creation and modification dates

Issue: 6.1 (November/December 2007)
Author: Brad Rhine
Article Description: No description available.
Article Length (in bytes): 6,396
Starting Page Number: 36
RBD Number: 6114
Resource File(s):

Download Icon 6114.zip Updated: Thursday, November 15, 2007 at 10:34 AM

Related Link(s): None
Known Limitations: 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:

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

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com