Special

Clearance Sale!

We've been publishing for over five years now and it's time to clear out our inventory of back issues, so we're slashing prices!

RBD Magazines

Check out this amazing clearance sale of all our past issues. Missing some issues? This is a great time to complete your RBD collection. Save up to 40% off the regular price of our printed back issue packages. These prices are only good until the end of the year May 2008 and supplies are limited, so place your order today.

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