Hi c pa

Is your code available on GitHub? It would easier for me to inspect it and
provide comments there.

> My next item is to implement the ability to control the reveal widget by
searching for the presence of a tag on a tiddler.

I originally thought that functionality would be necessary but it turns out
that the list widget can already do it:

<$list filter="[is[current]tag[mytag]]" emptyMessage="Displayed if the
tiddler doesn't have the specified tag">
Displayed if the tiddler does have the specified tag
</$list>

> This looks like it should be easy but I'm having some trouble figuring
out how to correctly call wiki.getTiddler

I don't see anything wrong with the code you've provided.

Best wishes

Jeremy

On Sun, Sep 14, 2014 at 11:33 PM, 'c pa' via TiddlyWiki <
[email protected]> wrote:

> >> I'd recommend against the approach of adding a tiddlerfield module
>
> Okay. I've implemented the functionality so it works for both tagfields
> and text fields, so you can use it to manage lists of items using
> checkboxes and buttons on both
> Posted at http://cpashow.tiddlyspot.com/
>
> Not yet packaged - probably won't get to that till after the release.
>
> I've also managed to make it work for the tag, tags, tagging, and untagged
> filters.
>
> On the untagged filter I noticed that it also returns all tiddlers that
> don't have the field. So should I tweak untagged so it doesn't return a
> tiddler if it doesn't have the field? Or should I create a filter that
> searches for the presence of a field on the tiddler?
>
> My next item is to implement the ability to control the reveal widget by
> searching for the presence of a tag on a tiddler. This looks like it should
> be easy but I'm having some trouble figuring out how to correctly call
> wiki.getTiddler
>
> RevealWidget.prototype.execute = function() {
>     // Get our parameters
>     this.tagfield = this.getAttribute("tagfield");
> };
>
> RevealWidget.prototype.readMatchState = function(state) {
>     if (this.tagfield) {
>         var tiddler = this.wiki.getTiddler(this.stateTitle);
> //not executing as expected
>         this.isOpen = tiddler.hasTag(this.text,this.tagfield);
>     } else {
>         this.isOpen = state === this.text;
>     }
> };
>
>  --
> 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 http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jeremy Ruston
mailto:[email protected]

-- 
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to