Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 20 in printed book and digital formats -- plus a one-year subscription (beginning with 21.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Recent issues

Article Preview


Buy Now

Issue 6.1

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):

Download Icon 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.