On Monday, January 26, 2015 at 9:10:37 PM UTC-5, BJ wrote:
>
>
>
> On 26 January 2015 at 00:18, PE Pat <[email protected] <javascript:>> 
> wrote:
>
>> Most of my tiddlers are getting system-generated titles -- Task 1, 
>> Content 3, Cue 57, etc. The user can input "titles" but these are stored in 
>> the caption field. A title like "offense" or "passing" is likely to come up 
>> in several sports so I just let the system take care of the titles and 
>> display captions instead.
>>
>> This is very convenient but say I delete a tiddler titled "Task 8". Let's 
>> say that it described an activity that you could do to practice the serve 
>> in volleyball, which is what I'm working on now. Now I want to add a task 
>> for the spike, but the next task I add will be called "task 8" and if it's 
>> not removed from the list of serve tasks, it will show up there where it 
>> doesn't belong.
>>
>  
> I still not getting this (but I have just been on a bus for 10 hours and 
> am a bit groggy) - do you mean it is in a  list field when you edit a 
> tiddler, or appears elsewhere?
>

I modified the taglist widget so that the filter uses a "listField" instead 
of a tag to find tiddlers:

       var defaultFilter = "[list["+ this.listtag + "!!" + this.listField + 
"]listfield[" + this.listField + "]]";


Using the example above, let's say that "Task 8" was originally created and 
put into the "task" field of the "Content 1" tiddler. In the table of 
contents, I use the following:
   <$taglist tag="Content 1" field="tasks">
to display all tasks associated with Content 1.

Now say I delete Task 8. It is no longer displayed in the table of 
contents, but it remains in the "task" field of Content 1.

Now I hit the "new task button" for Content 2. Its title will be "Task 8" 
because that is the next available system title for a new tiddler using the 
template tiddler "Task". It will appear in the table of contents under 
Content 2 because the "new task button" adds it to the "task" field of 
Content 2. 

BUT, it will also reappear under Content 1, because it was never removed 
from the task field of Content 1. This was indeed what used to happen. This 
is a problem because it doesn't belong there. It's not a task for Content 
1, it's a task for Content 2. I've resolved this problem with the remove 
widget I posted ealier.

 
>
>>
>> I get that the lists were intended to provide an order for the results of 
>> a filter, and that if the new task 8 is not tagged "serve" it won't matter 
>> if it's in the serve list or not. But there are other types of tiddlers 
>> tagged "serve," so the filter would have to be something like 
>> [tag[serve]tag[task]] and this  would also require a modification to the 
>> taglist widget.
>>
>> Basically, the extent of my programming experience was c++ in high 
>> school. I am trying to force tw into an OOP paradigm because it's what I 
>> understand. My "classes" are tasks, content, objectives, etc and some of 
>> these classes have arrays of objects of other classes. I repurposed the 
>> list concept to make it more like an array, so if a tiddler gets deleted, 
>> it should be removed from all arrays.
>>
>> I appreciate everyone's patience with this as I am not a real programmer 
>> and I know that some of my solutions are not the best. Maybe I will post my 
>> work on tiddlyspot so you can see the changes I made and how it's being 
>> used.
>>
>> I don't know if I know any 'real' programmers - maybe they have flat 
> fingers!
> To me programming is a skill (like carpentry) - something that can be 
> develop in oneself. The thing that is really interesting (to me at least) 
> is what you make using the skill - you seem to be very creative with yours.
> It would be good if you could put something on tiddlyspot for us to have a 
> look and give some feed-back. 
>

Thanks for the encouragement BJ. I posted what I have right now at 
pespot.tiddlyspot.com. It is very much a work in progress and there are a 
lot of simple things that don't work right now because I had to redo the 
whole thing, but you can see the modifications I made to the taglist 
widget, as well as some other widgets which I think may be useful outside 
of this application. One is an "append" widget which adds a list of 
tiddlers to a tag field or list field of another list of tiddlers, and the 
other is a "setfieldlist" widget which is the same as the action-setfield 
widget except it acts on a list of tiddlers rather than just one. You can 
find links to these in the "Base" tab of the sidebar under "Scripts." They 
can definitely be improved with some "splice" or "slice" statements but I 
don't know those too well so I used strings instead.

I would love to get some feedback but I can't promise that I will implement 
anything. I'm in grad school and student teaching and this was supposed to 
help me save time on my schoolwork by helping me organize information and 
automate some repetitive parts of the lesson planning process. Instead it 
has become a massive time suck and I need to be done with it very soon. To 
be honest it's kind of a mess, kind of a Frankenstein of a program. 
Nevertheless it's about to work well for what I need at the moment. I will 
have more time to clean it up this summer, but I will also update it when I 
am finished for now.

I know enough about programming to know that a lot of the "solutions" I 
used are not "good practice" in the sense that they are not structured so 
that they will be broadly and easily reusable. I can take criticism and I 
know this program has a ton of room for improvement -- a lot of it was done 
late at night and sometimes when I look back I don't even understand 
how/why some of it works. At the very least it is an example of an attempt 
to use Tiddlywiki as a computer programming platform.
 

> --
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "TiddlyWikiDev" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/tiddlywikidev/w0R1o32Do2I/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/tiddlywikidev.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to