ToDoList

Adrian Middleton
© Copyright 2008

ToDoList Example
Introduction
Distribution
Outline
History
ToDoList.ini File
Main Window
The ToDoList Database
Back-up Database
ToDoList Views
Filter View (Search)
Default View
Print View
Save View
Adding and Editing Entries
Add Entry
Copy Entry
Edit Entry
Changing the Priority
Deleting a 'Done' Entry
Clearing Old Diary Entries
Calendar Window
Help Window

Introduction

ToDoList is a Windows application which maintains a simple 'ToDo' List and Diary. The entries can be prioritised and viewed or printed in a number of combinations.

Distribution

ToDoList is a single Windows executable file (ToDoList.exe) that calls on standard Windows facilities to control file opening, printing, etc.

The executable is provided as part of a single Zip file (ToDoList.zip) together with its help text (ToDoListHelp.html), style sheet (ToDoListSS.css) and image files (ToDoList*.gif).

The application is provided as Freeware (i.e. at no cost) with no warranty. You are free to use ToDoList, but I would ask that if distributed further, it is distibuted as the complete Zip file which includes the Help files. Copies of the Zip file and an email link for comments or suggestions can be found on my web site at www.middlea.freeserve.co.uk.

ToDoList is still regarded as a work-in-progress and effectively a test version. Any comments about it would be especially welcome at this stage.

Outline

ToDoList is a standalone Windows application that maintains a ToDo list, a separate 'shopping' list, and a simple diary. Entries can be added, copied, edited, prioritised and deleted in various ways, and can be displayed in various 'views' to show different combinations of entry types. Views can be printed, or can be saved as CSV files.

Entries can be given a date and time, and an alarm message and sound can be given when the time is reached (if ToDoList is running). If required, dated ToDo entries can be set up to repeat after a set period, and repeated Diary entries can be created.

ToDoList entries are held in a 'database' file, and any number of database files can be created. When ToDoList is opened, it displays the last opened database using a 'default' view, and the window is sized and located as it was when the application last closed. ToDoList can therefore easily be opened (e.g. using a shortcut in the Startup folder) without needing to select a database or view.

History

ToDoList was written for my own use to provide a simple ToDo List that allowed entries to be allocated either a priority or a due date. A simple Diary was an obvious extension, soon followed by a separate list for Shopping, alternative views and printed lists.

ToDoList has been written using REALbasic, an object oriented integrated development environment (IDE) available from REALsoftware.com. This includes its own relational database facilities based on SQLite. REALbasic produces self contained applications that call upon standard system resources for file opening, printing, etc. ToDoList has been developed using these facilities to include its own data handling and storage, as well as its mapping functions.

Though REALbasic can be used to compile for Linux and Mac platforms, ToDoList has currently only been built for Windows.

The current version is shown in the Help>About menu option as 'Major version.minor version.bug version [stage (build)]' (stage and build are only given on test versions). If you want to contact me with any comments it would be worth including this information.


ToDoList.ini File

Startup details for ToDoList are stored in the ToDoList.ini file, which is held in the same folder as the application. If the file is not found, it will be created using default values. Though the file is a simple text file and can be edited as required, it will be overwritten when any change is made to the Current Database, the Default View, or the window size or position.

Main Window

ToDoList IconToDoList is run by double clicking on the ToDoList icon or on its file name in the same way as any Windows application. It does not need to be installed.

ToDoList opens with its Main Window which shows a view of the current default database (as defined by the ToDoList.ini File).

ToDoList Main Window

The list shows the name of the current database file (the path may be truncated on the left to fit the window width), the current View and the current Date and Time. The main box of the window shows a combination of the entries currently on the ToDoList database. The entries can be of three main types ...

Dated entries can optionally have a Time set and can (again optionally) have an alarm set that gives message when the time is reached or passed (e.g. if the application is not started until after the set time).

The list can be manipulated using the window menu, window buttons, or key combinations ...

MENUBUTTONKEYS
DatabaseNew DatabaseCtrl/N
Open DatabaseCtrl/O
Back-up DatabaseCtrl/B
Clear Old Diary EntriesCtrl/Shift/X
Exit'Exit' Button
ViewDefault View>* ButtonCtrl/0
ToDo List<< or >> ButtonCtrl/1
All Dated ToDo Items<< or >> ButtonCtrl/2
Future Diary Items<< or >> ButtonCtrl/3
All Diary Items<< or >> ButtonCtrl/4
Shopping<< or >> ButtonCtrl/5
All Items<< or >> ButtonCtrl/6
Filtered Items<< or >> ButtonCtrl/7
Set Default ViewCtrl/V
Print ViewCtrl/P
Save Data from ViewCtrl/S
EntryAdd Entry'Add' ButtonCtrl/A
Copy Entry @@'Copy' Button @@Ctrl/C @@
Edit Entry @@'Edit' Button @@Ctrl/E or double click @@
Increase Priority ##'Up Arrow' Button ##Ctrl/Up Arrow ##
Decrease Priority ##'Down Arrow' Button ##Ctrl/Down Arrow ##
Done / Delete Entry @@'Done' Button @@Ctrl/D or 'Delete' @@
HelpOpen Help BrowserCtrl/H
About

(@@ - these menu options, buttons and key combinations are only enabled if an entry is selected in the view box. They apply to the selected entry.)
(## - these menu option, buttons and key combinations are only enabled if an undated ToDo or Shopping entry is selected in the view box. They apply to the selected entry.)

On 'Exiting' the application using the "Exit" Menu Option, or closing the Main Window using the Windows 'Close' button, ToDoList will check for any existing backup files and if the current database has not been backed-up today it will offer to perform a Back-up.

The ToDoList Database

The ToDoList entries are held in a 'database' file (*.tdd). The user can have as many such files as are necessary, but only one will be treated as the 'current' database.

ToDoList databases (*.tdd files) are in fact 'REAL SQL' Database files based on 'SQLite', which is described at http://www.SQLite.org. The database could be used in other suitable applications if required.

Create Database

On first opening the ToDoList application, no database will be open. A new database can be created from the Main Window Menu (or by using Ctrl/N). The user can then select a path/location and name of the database file.

Open Database

An existing database file can be opened at any time from the Main Window Menu (or by using Ctrl/O). The opened file will become the current database and will be noted in the 'ini' file.

Backup Database

The current database can be backed-up at any time from the Main Window Menu (or by using Ctrl/B). If the database has not changed since the last backup, a warning message will be shown. Otherwise, the user will be shown details of the last backup and will be asked to confirm the back-up. The backup files will be placed is the same folder as the database and will have the same name suffixed by "-001", "-002", etc. They are a simple copy of the database and retain the .tdd extension.

ToDoList Backup Dialog

Views

Several Views have been included in ToDoList to show different combinations of entries from the database. In general, dated entries will be arranged in date/time order, and undated entries in descending priority order (1 through 9). Each entry will be formatted (as shown below) to show a summary of the entry details (which are more fully explained in the Add Entry section) and each entry is colour coded for easy identification of its type and priority. Bold lines separate dated and undated entries, and ToDo and Shopping entries. Items dated for today are also separated by a bold line and their text is shown in bold. Finer lines separate weeks within the dated entries (Sundays are treated as the start of the week!).

Though only one column will initially be visible in the view, further columns are hidden to the left of that shown. These can be revealed by dragging the left edge of the column heading. These hidden columns show the Creation Date/Time for the entry, it last Modification Date/Time, and a coded note of its Type and Priority (e.g. TDP for dated ToDo Items for Past dates, SH3 for priority 3 Shopping entries, DIT for Todays Diary entries, etc.). The list can be re-sorted by clicking on the column headings. The original sort order will be reinstated by selecting the view again, or when any change is made.

The ToDo List view provides a basic working view of outstanding and current ToDo entries and details of dated entries for the next month. It also includes today's Diary entries.

The All Dated ToDo view shows all dated ToDo entries, including those over one month in the future.

The Future Diary view shows all Diary entries for today and future dates.

The All Diary view shows all Diary entries, including those for past dates.

The Shopping view shows all Shopping entries.

The All Items view shows all entries whether undated, past or future.

The Filtered Items view is a variant on the All Items view showing only selected items (see later note).

ENTRYLAYOUTVIEW ...
ToDo ListAll Dated ToDoFuture DiaryAll DiaryShoppingAll Items
/ Filtered
Overdue Dated ToDo entries[-n] date time {+mX} textYesYesYes %%
Past Diary entriesdate time textYes
Today's Dated ToDo entriesdate time {+mX} text *YesYesYes %%
Today's Diary entriesdate time text *YesYes
Undated ToDo entries
     Priority 1
textYesYes
     ... Priority 9textYesYes
Shopping entries
     Priority 1
textYesYesYes
     ... Priority 9textYesYesYes
Future Dated ToDo entriesdate time {+mX} text *1 Month %%YesYes %%
Future Diary entriesdate time text *YesYes

The elements of the layouts shown comprise ...

[-n] shows the number of days the entry is overdue;
time is optional;
{+mX} is optional and shows how a dated Todo entry will be repeated once completed, m being the number of units defined by X (D/M/Y = days, months, years); and
* is also optional and indicates that an alarm is set for a timed entry.

(%% These entries are sorted together in the view.)

Views can be selected from the menu, or using Ctrl/1 - Ctrl/7. Alternatively the views can be cycled using the "<<" and ">>" buttons.

ToDoList Filtered ItemsThe Filtered Items view (shown on the left) effectively provides a Search facility by showing all entries whether undated, past or future, but restricted by a set of filters. The Filter box is enabled when this view is selected, and a set of text strings can be entered separated by spaces, commas or semi-colons. As the strings are entered the list of items displayed is restricted to those items where the text contains ALL of the entered strings. The number of items found is shown in the list heading and in printed reports.

Any view can be defined by the user as the Default View. This is defined from the menu or by Ctrl/V and is shown by asterisks in the view heading (e.g. "* ToDo List *"). The Default View is noted in the ToDoList.ini File and is displayed when the application is opened. It can be selected at any time from the menu or by using Ctrl/0, or using the '>*' button in the Main Window.

ToDoList Printed ReportThe user can Print a report of the current view from the menu or using Ctrl/P. The format (shown on the right) is based on the View format, but the colour coding is confined to a coloured band on the left of the page.

A comma separated file of the view details can be Saved from the menu or by using Ctrl/S. As well as header details, including the Current Database path and name, the View header and the Current Date/Time, each entry comprises its Creation and Last Modification Date/Time, its Type and Priority (as held in the hidden columns of the view), and its details as shown in the view.

Adding and Editing Entries

Adding Entries

New entries can be created using the Add Entry option of the Entry menu, Ctrl/A, or the 'Add' button. Any of these will open the 'Entry Window' with default details ...

ToDoList Add Entry

Any text can be entered in the top box. 'Enter' can be pressed to create multiple lines, but only the first line will show on the Main Window view - all lines will be shown on printed reports and in saved files.

The Type can be selected from the popup menu (Diary / ToDo (default) / Shopping).

For ToDo and Shopping entries, a Priority (1-9 - default 2) can be selected from the list.

ToDo entries can be dated using the Dated tickbox (set by default for Diary entries) - the Priority will then be replaced by a second Timed tickbox. Ticking these boxes makes date and time settings available ...

ToDoList Timed Entry ToDoList Diary Repeat

For dated entries, the default date will initially be set as the current date and this can be changed using the Up/Down arrows or be clicking the 'Calendar' button to open a Calendar Window. The Date can be reset to the current date using the '>*' button.

For a Timed entry, the default time will also be set to the current time and can be changed using the Up/Down arrows. The time can be reset to 00:00 (Midnight) using the '>0' button or to the current time using the '>*' button.

Dated Todo and Diary entries can also be Repeated. For ToDo entries the repeat details (a set number of days, months or years) will be stored and used to set up a repeat entry once the original entry has been completed/deleted. For Diary entries, a set number of repeated entries will be created immediately so that they can be seen in the Diary - the repeat details (number/period) will not be stored with the entries. The 'number of times' does not include the original entry - a value of zero therefore creates no repeats.

The entry is saved by the Save New button. Cancelling or closing the window will discard the details.

Copy Entry

If an entry is selected in the view, it can be copied using the menu option, Ctrl/C or the Copy button. The entry window is then opened showing a copy of the existing entry with a Save New button.

Copying Diary entries that were created as Repeating entries does not include the repeating details but these can be re-entered as required.

Edit Entry

If an entry is selected in the view, it can be edited using the menu option, Ctrl/E, the Edit button, or by double clicking on the entry (pressing the 'Return' key was allowed (briefly) in an earlier version but has since been removed due to a program conflict). The entry window is then opened showing details of the existing entry with a Save Edit button.

Details can be changed as required. For information the window also shows the date/time the entry was created and last modified.

Editing Diary entries that were created as Repeating entries does not include the repeating details.

Changing the Priority

If an undated ToDo or Shopping entry is selected in the view, its priority can be changed by editing the entry, or using the Increase/Decrease Priority menu options, Ctrl/Up or Down Arrow or the Up or Down Arrow buttons.

Deleting a 'Done' Entry

When an entry is completed it can be deleted using the 'Done / Delete' menu option, Ctrl/D, the 'Done' button, or by pressing the Delete key. Confirmation will be requested, and if the entry was a repeating dated ToDo entry, a second dialog box will ask if the repeat should be created - if so, the Entry Window will be opened showing the relevant (amended) details.

Clear Old Diary Entries

'ToDo' and 'Shopping' entries remain visible in the 'ToDo List' View until they are deleted (as described above). Past Diary Entries can also be deleted from the 'All Diary' or 'All Items' Views, but they are no longer seen in the 'ToDo List' View and may therefore remain on the database long after they cease to be relevant.

An option has therefore been included in the Database Menu (or via Ctrl/Shift/X) to Clear Old Diary Entries. The option first prompts the user to make a Backup of the Database (as described above) then asks for the number of past months (1-12) that are to be kept on file. Selecting 'Clear' then checks for records to be deleted and asks for confirmation before deleting them.

Calendar Window

ToDoList Calendar Window

In the Calendar Window, the Year, Month and Day can be changed using the Up/Down arrows, or a date can be selected by clicking in the calendar table. Today's date is highlighted in bold, and the currently selected day is shaded. Today's date can be reselected by clicking on the '>*' button.

Clicking OK passes the new date to the Entry Window - Cancelling the window leaved the date unchanged.

Help Window

ToDoList Help Window

The Help window is a simplified HTML browser that can be called directly from the Help Menu. The Go To Top button will move to the top of the text where you will find links to the different help sections.

The browser window can be resized, and text can be scrolled using the scroll bar.

The browser expects ToDoListHelp.html and various other files to be in the same folder as the ToDoList.exe application file.

The file ToDoListHelp.html can also be opened in any other browser (e.g. Internet Explorer).