To avoid the "tiddler is null" error (which I'm not expert enough to
understand, but must have something to do with refresh, since opening
and closing the tiddler gets rid of the error), do this:

<<checkbox [[]] [[]] [[]] [[]] [[{var
here=story.findContainingTiddler(place); if (!here) return; var
t=store.getTiddler(here.getAttribute('tiddler')); if
(t.tags.containsAll(['Complete','Test Tag'])&&!t.tags.contains('tag
2')) {store.setTiddlerTag(t.title,0,'Complete');
store.setTiddlerTag(t.title,1,'Next');  } else if (!
t.tags.containsAny(['Complete','tag 2'])&&t.tags.contains('Test Tag'))
{store.setTiddlerTag(t.title,1,'Complete');
store.setTiddlerTag(t.title,0,'Next');}}]]>>

Try the example here: http://cmariexamples.tiddlyspot.com/
Here's an attempt to explain the logic:
1. In all cases, the tiddler must contain the tag "Test Tag' .
2. If it is tagged 'Complete' AND NOT tagged 'tag 2' (the addition of
'tag 2' was just to demonstrate that the conditions could be more
complex), then checking the box will remove 'Complete' and add 'Next'.
3. If it is NOT tagged 'Complete' AND NOT tagged 'tag 2', then
checking the box will add 'Complete'.  If 'Next' is present, it will
be removed.

cmari

On Feb 21, 7:40 pm, Mike <[email protected]> wrote:
> cmari,
>
> Do you have that super checkbox example online somewhere so I can take
> it apart and see what all is going on?
>
> I keep getting: Checkbox onClickAfter error: TypeError: tiddler is
> null (google wrapping maybe?)
>
> Thanks,
>
> Mike
>
> On Feb 21, 7:03 pm, Anthony Muscio <[email protected]> wrote:
>
> > FND,
>
> > Thanks That seems to work for standard tags. Unfortunately I have tags
> > beginning with "=" and other punctuation characters. I rue the day I did
> > that. Is there any easy way to permit them in your code ?
>
> > eg; <<reTag ".task" "=comms =place =ping">>
>
> > Thanks Tony
>
> > TonyM
>
> > If you have not found an easy way to do it with TiddlyWiki, you have missed
> > something.www.tiddlywiki.com
>
> > On Wed, Feb 17, 2010 at 22:23, FND <[email protected]> wrote:
> > >  Can anyone tell me how I can find/make a macro to remove more than one
> > >> tag of the current tiddler, with one click ?
> > >> [...]
>
> > >> Ideally I would like to be able to add a tag at the same time
>
> > >http://gist.github.com/306522
> > > (use the "raw" link)
>
> > > Usage: <<reTag [new tag] [tags to be removed]>>
>
> > > It's a quick hack, I haven't really tested it much.
>
> > > -- F.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "TiddlyWiki" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<tiddlywiki%[email protected]>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/tiddlywiki?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to