I didn't test any of this. So you'll have to write it yourself and debug my 
errors. But here is what you want (What you want isn't simple)

User Requirements:
1. A tiddler contains a list of todo items, the items don't need to exist 
as separate tiddlers
2. An item may contain another list of sub todo items
3. When checked, the item displays with strike-out
4. Each item may contain descriptive text

System requirements
1. If an item has sub-items, the item must exist as a tiddler
2. If an item has descriptive text, the item must exist as a tiddler

System components
1. A data entry box to enter the name of an item to be created in the 
current tiddler
    <$edit-text tag="input" tiddler="$:/temp/new_todo_item" />
2. A field to contain the list of todo items
    field="todoitems"
    todoitems is a field that contains a list of todo items
3. A button to add the item to the list
   <$button>
        Add item to list
        <$action-listops $field="todoitems" 
$subfilter={{$:/temp/new_todo_item}}  />
   </$button>
4. A field to hold the description
    field="description"
5. A data entry box to enter the description
    <$edit-text tag="input" field="description" />
6. A view item to display the description
    <$view field="description" />
7. A tag that identifies a todo item
    tag="todo"
8. A viewtemplate for todo items 
    title:"View Template for todo Items"
    tags:"$:/tags/ViewTemplate"
    text:"""
        <!-- List identifying if the current tiddler has tag todo -->
        <$list filter="[all[current]tag[todo]]">
            <!-- Add a checkbox to decide if the current tiddler should be 
in edit mode -->
            <$checkbox tag="edit">Edit</$checkbox>
            <!-- List identifying if the current tiddler has tag edit -->
            <$list filter="[all[current]tag[edit]]" >
                <$edit-text tag="input" tiddler="$:/temp/new_todo_item" />
               <$button>
                  Add item to list
                 <$action-listops $field="todoitems" 
$subfilter={{$:/temp/new_todo_item}}  />
                 <$action-setfield $tiddler="$:/temp/new_todo_item" 
$field="text" $value=""/>
               </$button>
               <$edit-text tag="input" tiddler={{$:/temp/new_todo_item}} 
field="description" />
            </$list>
            <!-- List all the items -->
            <ul>
                <$list filter="[list[!!todoitems]]">
                    <li><<currentTiddler>></li>
                </$list>
            </ul>
        </$list>
9. A field to hold the items that are done
    filed="doneitems"
9. Some piece of code to add a done button and text formatting to the items 
being listed
    \define showTodoItem(item)
         <Find if the item is in doneitems -->
        <$list filter="[all[$item]] -[list[!!doneitems]]" emptyMessage="""
           <!-- This is a done item -->
           <$button>
              X
             <$action-listops $field="doneitems" 
$filter="[list[!!doneitems]] -[[$item$]]"  />
           </$button>
           --$item$--
        """>
           <!-- This is a todo item -->
           <$button>
              _
             <$action-listops $field="doneitems" $subfilter="[[$item$]]"  />
           </$button>
           $item$
        </$list>
     \end
10. A piece of code to display the item, check to see if it exists as a 
tiddler, and then display the same stuff if that tiddler has its own todos
     <li>
     <$macrocall $name="showTodoItem" item=<<currentTiddler>> />
     <!-- check to see if the current item exists as a tiddler -->
     <$list filter="[all<currentTiddler>is[tiddler]]">
         Display all this stuff. . .  I guess I should have made the whole 
thing a macro eh.
     </$list>
    </li>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a8779542-b954-41a2-9ae7-3b603c88400e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to