Hi Stephan So do I read this correct as "The filters are only suitable for the simple > cases"? >
Yes, for surprisingly complex definitions of "simple". So far, I've been pleasantly surprised at how far I've been able to get with implementing the TW5 UI without making the filter syntax more complex. > So as soon as someone wants a filter expressing something like the shown > > > [[one]] [[two]] ( [[three]] +[tag[tom]] ) > > (S)he needs to fall back to JS? > I think that example would be written: [[one]] [[two]] [[three]tag[tom]] > ;) They use it any nevertheless. Would words make it better? > [[one]] or [[two]] or [[three]] and [tag[tom]] > But this still leaves the ambiguity of not making clear whether the "and" applies to just the last or all 3. Yes. We return to the observation that the familiar constructs of programming languages are probably the most appropriate way to address complex requirements. > Ah... forget it... I'm too much a programmer I fear ;) Which is good! Programmers needs must be catered too, but they're needs are not as primal driver for TW5 development as the needs of end users. > Example: I wanted to filter tiddlers with 3 tags, so I wrote: [tag[tag1]tag[tag2]tag[tag3]] That example gives all tiddlers that are tagged with tag1 and tag2 and tag3. > instead of [tag[tag1]] + [tag[tag2]] +[tag[tag3]] A plus on it's own, not immediately preceding a run of filter operators actually acts like [title[+]], and adds the title "+" to the accumulator. So the effect of the above is to: * accumulate all tiddlers tagged tag1 to the storage register * accumulate the tiddler "+" to the storage register * accumulate all tiddlers tagged tag2 to the storage register * retrieve all stored titles back into the accumulator, and filter to those tagged "tag3", and return the result > BTW: Wouldn't that be a nice syntax for "and"? so [[one]] [[two]] [title[three]tag[tom]] > would express my first understanding of the + syntax That example gives you the tiddlers titled "one", "two" and the tiddler titled "three" if it is tagged "tom" > Maybe even, as a short notation: [[one]] [[two]] [[three]tag[tom]] That is indeed equivalent to the previous example. > What do you think? I think you'll be wanting to drop into JS from time to time as the best way for you to accomplish certain things. Best wishes Jeremy -- Stephan -- Jeremy Ruston mailto:[email protected] -- 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/groups/opt_out.
