Hi Andrew

The state of a checkbox (checked/unchecked) is tied to the presence/absence 
of an item in a list. When cycling a tag, therefore, what should the state 
of the checkbox reflect?

Rather build a button which cycles the tag on each click -- the current 
state can be displayed (on the button, if you wish) with the keep[] 
operator (designed specifically for this purpose.)

There's an example of this on the demo website here 
<http://listops.tiddlyspot.com/> -- flip through the slides to keep[] 
Operator (Examples), and repeatedly click any of the tags at the bottom of 
the page. This should be something like what you're after.

You'll need the version of the x-listops.js filters from the demo site 
(which includes the cycle[] and keep[] operators) -- then adapt the code 
from the aforementioned example.

regards

On Tuesday, 2 February 2016 17:24:06 UTC+2, Andrew Whiting wrote:
>
> Hi Matabele,
>
> I stumbled across this thread and was wondering if there is a way to 
> combine your cycle [] filter operator with a checkbox so that checking the 
> box removes one tag and adds the next in the cycle? I'm new to TIddlyWiki 
> and am not in any way a programmer so hopefully that's not a dumb 
> question...
>
> For some added context, I'm pulling in a linked list of the titles of all 
> tiddlers tagged "Review" that were created 2, 7, 14, 28 etc days ago (as a 
> way of systematically reviewing class notes). I would like to use your 
> cycle filter operator to make it so that checking the box next to the title 
> removes "Review" and adds "Review 2" (or removes "Review 2" and adds 
> "Review 3" and so on) to bump the tiddler into the next group with a longer 
> waiting period.
>
> I've been at it for hours and am stumped haha.
>
> Thanks in advance!
>
>
>
> On Friday, January 15, 2016 at 10:45:56 AM UTC+1, Matabele wrote:
>>
>> Hi Casey
>>
>> You might like to have a look at my new cycle[] filter operator from here 
>> <http://listops.tiddlyspot.com/>. If you like this solution, copy across 
>> the modified version of the '$:/core/modules/filters/x-listops.js 
>> <#[email protected][email protected]_%24%3A%2Fcore%2Fmodules%2Ffilters%2Fx-listops.js>'
>>  
>> filters to your wiki (from the More/Systems tab.)
>>
>> This mechanism has several advantages over my previous <<cycleTags>> 
>> macro:
>> -- only one reference list required
>> -- no conflicts between multiple buttons cycling the same tag
>> -- can work forward/reverse
>> -- can cycle multiple items in multiple lists/tiddler
>>
>> If you prefer this in the form of a macro, this works much like the old 
>> macro (taking values from the 'list' field of the current tiddler):
>>
>> \define cycleTags()
>> <$button>
>> <$action-listops $tags="+[cycle{!!list}]"/>
>> Cycle Tag</$button>
>> \end
>>
>> -- or, even simpler:
>>
>> \define cycleStatus()
>> <$button>
>> <$action-listops $tags="+[cycle[active waiting done]]"/>
>> Cycle Status</$button>
>> \end
>>
>> regards
>>
>> On Friday, 15 January 2016 11:29:46 UTC+2, Casey Allan wrote:
>>>
>>> Oh, this is cool. Thanks, Matabele.
>>>
>>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/388f1d21-b285-437c-8b24-0b6a9db9cc74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to