[Windows Mobile Apps and Games] RoryB:
CHT_DataLoaders.lua

Some time ago I noticed something in task widget:

If I have tasks that are due two weeks and later from now. They show up with red text. As the days go by and a task that shows red becomes less than two weeks away the text becomes gray.

Others have the same problem:

I began the process of editing CHT_DataLoaders.lua which is the 7B09A9E6_manila file after it is "cooked" in the kitchen:

My interpretation of the original code:

Even if you choose Sort by Start Date it still only includes items that have Due dates within the date range you pick, so items with start dates that do not have due dates in the range do not show up. It appears the intent is to show you tasks that are due within or before the range you select. Your choice of sort by due date or start date only sorts items due on the same date.

What I wanted is items without start dates to be included in the list no matter what their due date is.

In my code I have tried to get it to show start dates in the range instead.

In early development the red still showed up if I sorted by Start Date, but I think this is from the code using Due Date to set color and not sort date or something else.

To no longer have red Tasks listed beyond the Tasks Range, the list now only shows the tasks in the range and does not show any more than that. For example if you set the range to 2 days and you only have one task between now and then you will only see one task in the list.

I have a lot of tasks that do not have start dates so my list became long if I sorted by start date.

I decided to not include items that do not have start dates in the sort by start date and that made more sense.

Later, I changed to have tasks without start dates get sorted by their due date.

Now you should get a list of only items due within the range or before no matter when their start date is.

I find if I show both dates it "looks" better to sort by start date (my new standard setting).

One thing I have noticed if I choose not to show both dates and sort by start date it shows "..." for tasks without start dates and does not show the due date.

Later I figured out a way to do the sort differently.

Start Date:

Now if you select sort by start date you get all tasks that start before or during the task range.

This will include any tasks without start dates at the end of the list, but excludes those due beyond the task range.

This keeps the list smaller. Tasks that start on the same date are sub-sorted by their due date.

Due Date:

If you select sort by due date you get all tasks that are due before or during the task range.

This will include any tasks without due dates.

Tasks that are due on the same date are sub-sorted by their start date.

One thing you have to do is set task max count to 99 for it to work properly. Never mind, I updated the code to force it to be 99 no matter what you set it to.

Updated 12/29/2011

Reduced some redundant code and took out some code that does not seem to have an effect.

Updated 12/28/2011

Improve speed of getting first refresh of tasks into widget.

Updated 12/27/2011

Main thing is fixing the restart of CHT when you have no tasks.

Updated 12/08/2011

Tweaked the task loader portion to add a pause between running CHT task update program and refreshing the list of tasks.

Updated 11/23/2011

Tweaked the appointments filter for showing multiday and allday appointments.

Updated 11/15/2011

Still tweaking to get doNotRepeatMultiday to show the first occurance and not the rest.

Also, getting an AllDay appointment to not show up as ending the next day.

For all updated files I strongly suggest you copy your originals from the \windows folder as a back up. Then copy these to the \windows folder. Then restart Sense.