A simple and effective way to keep on top of your programming tasks

Downloads

Sample image

Latest Update 

3.8 Release

This month's release may seem a bit of a damp squib to some, but rest assured that heaps of work has been done even if it's not immediately apparent (For an exhaustive list of changes and see the history section at the end of the article).

Essentially there's only been one big change and that is the addition of four new task attributes: Allocated By, Time Spent, Status and Category

This is the first file format change for a while, so be aware of the implications: All versions of ToDoList after (and including) 3.6 will 'refuse' to edit a file format which they do not support. ie. upgrade your entire team in one hit.

Other than that there's a wide range of minor tweaks, bug fixes, new preferences which almost entirely come from user requests.

Rgds  

Related Links

If you have any questions about these contributions can you please direct them to the relevant party (either by email or by including their name in the subject line of your posting below)

Introduction

You know how it is - you start work on one project and halfway through you find one or two side-projects crop up that have to be solved before you can continue on the original project.

This is one such project with the added twist that it too started its life as a side-project.

Here's what happened:

<Cue wavy screen effect>

I can only imagine that the planets must have been in (mis-)alignment or something, because at one point a few months ago i was suddenly fielding emails on four or five separate articles I had previously submitted to codeproject, some asking for features and others for bug fixes.

Foolishly or otherwise, I largely agreed with all the points raised and subsequently found myself with 14 or 15 separate issues to resolve.

The situation was also made worse because I was trying to use CodeProject to keep track of all the things I had agreed to do, meaning that I had to continuously trawl the comments section of each article to remind myself of what I was supposed to be working on.

It even got to the stage where I was worrying that I'd fail to deliver on something - silly I know, but there you are!

Keeping a list on paper was a definite step in the right direction, but since I do all my coding on the same machine it seemed somewhat inelegant and anyway we all know what happens to crucial bits of paper left lying around on desks and such.

The next step was to hunt around on the web for a tool to meet the following requirements:

  • Simple interface
  • Support for hierarchical data
  • Numbered items/subitems
  • Open file format
  • Freeware

Simple, huh! NOT!

I will admit that I did not spend weeks searching, but I am still surprised at the general lack of software matching my needs.

On reflection I think that the reason may be simple: people are so used to commercial software being 'feature-rich' that when they come to design software themselves they (not unreasonably) think they too need to cram as much in as possible, often leading to software where a lot of essential functionality is hidden away in the menu bar.

So, surprise, surprise, I decided to write something myself.

However, it's fair to say that I did not originally intend to post it on CodeProject and am only really doing so because I had a heap of fun solving some very interesting problems and these are what I think make it worth it.

Using the Software

There's really very little I need to say here since every feature/function is explicity visible in the interface.

Nevertheless, the following list of basic capabilities and omisions may go someway to answering any questions that arise:

  • Files are stored in XML format with .xml file extension
  • Trying to load a non-tasklist file will generally fail (unless you read the code to see how to circumvent it)
  • The number of items/subitems is limited only by memory (although performance may be the deciding factor before you exhaust memory)
  • Marking a parent item as 'done' will also gray-out child items but they are not disabled or automatically marked as 'done'
  • An ellipsis (...) indicates that an item has sub-items
  • all items can be expanded or collapsed (by double-clicking)
  • Top-level items and sub-items are created using different toolbar buttons
  • There are task-specific context-menus
  • The previously open tasklist is re-opened on startup
  • The tasklist is automatically saved when closing the software or minimizing it to the system tray
  • The default drag'n'drop mode is insertion. However, if you hold down the <Alt> key you can drop items onto other items as sub-tasks.
  • the priority of a task is shown as a grayscale box to the left of the item.

Points of Interest

Here's where we come to the side-projects I was talking about, the first two of which I intend to work up into follow-up articles.

They are:

  1. The 'ordered' tree control, which incorporates a non-client gutter for displaying the item numbers

    The idea stemmed from research I did into altnative designs for a tree-list control, which did not solve it by creating a hybrid control incorporating a tree and a list.

    The hybrid control seems such an obvious solution that I suspect few people have stopped to question it, but it has still always struck me as looking far too much like hard work to be truly elegant ('square pegs' and 'round holes' spring to mind).

    One possible idea is to implement the 'list' portion entirely in the non-client area of the tree. ie shift the right hand client edge to the left and then render the list portion in the resulting non-client area.

    Whilst I've yet to get round to building a proof of concept, it was nevertheless this ongoing mental debate which prompted me to try to solve the requirement for numbered items and subitems by rendering the item/subitem numbers in the non-client area.

    Without going into too much detail (as this will subsequently be an article of its own) this is how I got it to work:

    • Handle TVM_INSERTITEM and TVM_DELETEITEM to know exactly when items are added and removed
    • I these handlers recalculate the width of the gutter required to display the widest 'dotted' item/subitem number (note: this is not necessarily simply the deepest subitem)
    • If the required gutter width changes, call SetWindowPos(NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER) to force Windows to recalculate the non-client area of the control
    • Handle WM_NCCALCSIZE when it does and offset the left border by the required gutter width.
    • Handle WM_NCPAINT for painting the numbers

    This is necessarily an over-simplification but it captures the essence of the solution and all that essentially remains is lots of fiddling about to ensure the non-client area gets redrawn at the the right times to stay synchronized with the client area.

  2. Embedding .RC control definition data directly in a .cpp file to break the dependency on binary resources (aka 'Runtime Dialogs')

    This is an idea that has been floating about for quite some time and which has only recently gelled into a workable solution.

    The problem, put simply, is that if you want to take advantage of the resource editor in Visual Studio (and who doesn't) then you very quickly find yourself stuck with having to load dialog templates from resources compiled into the binary file.

    This further means that if you want to make use of a dialog across multiple projects then either you need to copy and paste the dialog template between project .RC files or you need to build the dialog into a dll from which it can be accessed.

    'Runtime Dialogs' (a snappy title I coined myself) is a solution that neatly sidesteps both the nuisance of copying dialog resources between resource files and the extra work (and maintenance) involved in packaging dialogs in dlls.

    And it works like this:

    • First, you design your dialog template in the resource editor, create a CDialog derived class using class wizard and wire up all the controls just as you normally would.
    • Next, you #include "runtimedlg.h" and change all instances of CDialog to CRuntimeDlg
    • Then, you cut and paste the control defintion section from the appropriate section in the .RC file and embed it directly in the dialog's .cpp file as a static string (with a bit of tweaking to handle double quotes and such like)
    • Finally in the constructor of your dialog you simply call CRuntimeDlg::AddRCControls(...) passing the control definitions as a string.
    • And CRuntimeDlg takes care of the rest including, if required, auto-sizing the dialog to suit the control layout.

    I'm certainly not suggesting that this is a 'win-win' solution for all situations but it certainly has merits in its closer coupling of dialog template to dialog code which makes sharing dialogs across multiple project a breeze.

    PS. In case its not clear here, I used CRuntimeDlg to create CToDoCtrl which encapsulates the ordered tree together with the priority, date and comments controls as a single simple-to-instantiate control.

    I'm also proposing to use them in the .NET port of my ProjectZip addin for VC6.

  3. Embedding the xml file in a web page

    This is possibly the most satisfying aspect of the whole project because it was completely unexpected.

    What I mean is that, until recently, my knowledge of DOM and XMLDOM was virtually non-existent, as its only since I've become more interested in the presentation of AbstractSpoon that I've been forced to get to grips with the various implementations of DOM and XMLDOM out there.

    I'm pleased to say that the code on my site works under IE 6.0, Netscape 7.1 and Mozilla, although custom code was required to achieve this.

Further Work

Whilst this tool was originally intended for my personal use only, it is now a 'community' project, so if you find it useful and want to make suggestions for enhancements or bug fixes then post below.

Please visit AbstractSpoon to see the current tasklist.  

History

  • 3.8.4 (27 Sep 2004)
    • fix for shortcuts which use keys that also appear on the keyboard numpad 
    • fix for displaying context menus via the keyboard
  • 3.8.3 (26 Sep 2004)
    • fix for UI bug which appears if resizing whilst editing a task title 
    • fix for spell check dialog not cancelling properly when checking the active tasklist.
    • fix for tasklist names not appearing on the tabs if a tasklist did not have a friendly project name
    3.8.2 (21 Sep 2004)
    • fix for function key shortcuts not working when focus is on edit field
    • fix for focus disappearing when switch tasklists (focus is forced back to tasklist tree) 
  • 3.8.1 (20 Sep 2004)
    • edit controls now correctly display auto-calculated parent task attribute values 
  • 3.8 Feature Release (14 Sep 2004)
    • Find dialog fully keyboard navigable
    • notification added if a newer version is run whilst an older version is already running
    • preferences added to weight '% complete' calculation by time estimate and/or priority
    • preference added to include/omit completed tasks when determining the highest priority subtask
    • attribute combo boxes now sorted
    • attribute combo boxes now allow case of items to be changed
    • bug fixed where spell checked task titles were not being updated
    • Find functionality modified to maintain same order of results as tasklist
    • 'exact' match option added to find dialog where previously it was just ranges
    • 'Time Spent' task attribute added
    • 'Allocated By' task attribute added
    • 'Status' task attribute added
    • 'Category' task attribute added
    • Task time can be defined in hours, days, weeks, months or years on a task-by-task basis
    • preference added to show short weekdays in dates
    • preference added to display non-file references as text (ie. this field can be used for things other than files)
    • preference added to choose HLS or RGB for rendering task colour gradient
    • preference added to allow time estimates to be automatically calculated as the difference between the due date and the start date in weekdays
    • Find Task dialog extended to allow for searching by task ID
    • preference added to show a task's priority as being the highest of its subtasks' priorities
    • preference added to hide decimal points in time fields (values rounded up and down as appropriate)
    • Export dialog extended to allow exporting the currently selected task only
    • colour hint added to priority drop list
    • spell checking extended to handle checking of an entire tasklist
    • menu option added to File menu to reset a tasklist's file version
    • more font size options provided for tasklist font
    • bug fixed where newly created tasklists were not be reloaded on subsequent startup
    • bug fixed where attribute columns were not being resized as text was typed into droplists
    • bug fixed where file ref browse button did not work if a url had previously been typed in
    • bug fixed where file references could be dropped into read-only comments field
    • better feedback if printing did not work (because this is done via user's default browser)
  • 3.7.2 (13 Aug 2004)
    • fix for empty decrypted project name bug (thanks to defenestration)
    • fix for min size bug
  • 3.7.1 (30 Jul 2004)
    • fix for jumping comments text
    • fix for multiple highlighted items in spellcheck dialog 
  • 3.7 Feature Release (20 Jul 2004)
    • fix for spaces in filenames dropped into comments field
    • improved reporting when files fail to launch using the 'file edit' control
    • fix redraw bug adding new subtask to completed task
    • fix for XP comments not clearing bug
    • completed items now always have 100% completion in xml file
    • fix for copy/paste bold bug
    • alt+F4 handler takes minimize to system tray preferences into account
    • spaces added fore and aft on filepaths browsed from the comments field
    • sort column no longer shown as pressed
    • editing operations 'flushed' before creating new tasklist.
    • sort direction added to column header
    • preferences dialog modified to be more scalable
    • preferences added to show file tabs as always stacked and always visible
    • context menu added to comments field with extra goodies
    • tooltip added when over links in comments field to remind how to launch them
    • column header text not offset when 'pressed' only when 'down'
    • the <escape> key can now be used to minimize ToDoList or send it to system tray depending on how you have set up the system tray preferences.
    • priority colour gradient now uses HLS (HLV) to calculate intermediate colours. If this disturbs you I will add a preference to control it.
    • height of column header corrected to suit font size (looked wrong in XP).
    • menu item added to explicitly create top level tasks
    • support added to use ini files if these are found in the application folder
    • placeholder added to tools dialog for selected task ID
    • custom colours are now saved and restored between sessions
    • find functionality extended
    • preference added to use a task's colour as its background rather than text colour.
    • spell checking added as plugin dll. source code will be released so that you can use your prefered spell check engine and dictionaries.
    • preference added to display dates in the UI in ISO format.
    • dates in the XML file are now stored in ISO format
    • XML parsing speed improved
    • XP manifest embedded in executable
    • preference added to use custom tasklist font in comments field too.
  • Help 1.3 (10 Jul 2004)
    • Updated for 3.7 release
  • 3.6.5 (25 Jun 2004)
    • added code to prevent older format ToDoLists overwriting newer format Tasklists. This is in preparation for adding some new fields in 3.8. Please upgrade as soon as you can - it's for your own protection!
    • XP manifest file restored
  • 3.6.4 (9 Jun 2004)
    • fixed edit shortcut conflict (<ctrl>+left/right).
  • 3.6.3 (7 Jun 2004)
    • improved feedback when files are not editable because they are under source control. 
    • fixed bug when loading readonly files (thanks to irrational john
  • 3.6.2 (6 Jun 2004)
    • fixed loophole in source control logic whereby anyone without source control enabled could modify a checked-out file
    • added source control preference to allow files to be kept checked-out after closing.
  • 3.6.1 (5 Jun 2004)
    • fixed compile time errors for VC7
    • tweaked field shortcuts to ensure all are unique
    • added a hidden text field to allow <ALT>+'B' to move focus to tasklist 
  • 3.6 Feature Release (4 Jun 2004)
    • fixed multiple html help window bug
    • calls added to complete task title editing before switching tasklists, exporting, saving, checking in, etc
    • fixed bug relating to clicking down on a header column and then moving mouse off header 
    • fixed themed support so that it won't keep trying to load uxtheme.dll under non-XP windows
    • fixed crash under XP with Virtual Desktop Manager
    • default task added to new tasklists to assist newbies (note: task only appears in response to File | New Tasklist
    • fixed bug relating to placement of tools placeholder popup menu
    • toolbar buttons reordered (users using custom toolbar images should get a warning)
    • fixed comments field drag/drop formatting issue
    • option added to find dialog to search 'allocated to' field
    • fixed network refresh bug
    • fixed time estimate infotip bug
    • added preference to allow tasklists to share a common splitter bar
    • fixed tasklist comments colour bug when selected item does not have the focus
    • active file tab is maintained between sessions
    • view menu now accessible when menubar is hidden
    • preferences are now cached to reduce registry access
    • splitter added between comments field and the rest
    • preference added to limit sorting to expanded items only
    • preference added to disable sorting when column heads are clicked
    • hyperlink capabilities added to comments field
    • file reference field supports relative file paths (relative to the tasklist folder)
    • preference added to support multiple instances of ToDoList
    • right-click menu added to tab bar (for file related actions)
    • help 'integrated' into ToDoList
    • shortcuts now work when an edit field has the focus unless the edit field uses the same shortcut
    • File | Open now supports multiple file selection
    • preference added to replace task list checkbox image
    • tool-related file actions moved to Tools menu
    • Toolbar and Menubar can now co-exist (see View menu)
    • Due task notifications now supports 'future' dates (see Preferences | File Actions)
    • Tasklist tabs can now be reordered via the View menu
    • New submenu added to Tools menu for displaying due tasks on request 
  • Help 1.2 (4 Jun 2004)
    • Updated and improved for 3.6 release
  • Help 1.0 (15 May 2004)
    • Initial Release
  • 3.5.x-1.1 (removed by .dan.g.)
  • 1.0 (4 Nov 2003)
    • Initial Release

About .dan.g.


.dan.g. is a former chartered structural engineer from the uk. he's been programming for 20 years since university and has been developing commercial windows software in australia for the past 6 years. he has a shaved head and assorted whiskers should you want to recognize him.

For all his latest code creations visit AbstractSpoon Software

Click here to view .dan.g.'s online profile.

posted @ 2004-09-28 12:19  changton  阅读(632)  评论(0)    收藏  举报