Hi Linus,

You are almost there.

Change in the second macro

\define newHereButton()

to

\define newToDoHereButton()

and it works.

Cheers,

Ton


On Wednesday, June 17, 2015 at 3:15:59 PM UTC+2, Linus Johnsson wrote:
>
> Dear all,
>
> I have tried adding a simple button to the view toolbar. It's supposed to 
> create a tiddler tagged with the current tiddler and "§todo".
>
> Here is the code for the button tiddler ($:/gpqw/buttons/NewToDoHere):
>
> \define newToDoHereButtonTags()
> [[$(currentTiddlerTag)$]] $(toDoTags)$
> \end
>
> \define newHereButton()
> <$button tooltip={{$:/gpqw/buttons/NewToDoHere/Hint}} 
> aria-label={{$:/gpqw/buttons/NewToDoHere/Caption}} 
> class=<<tv-config-toolbar-class>>>
> <$action-sendmessage $message="tm-new-tiddler" title="NewToDo" 
> tags=<<newToDoHereButtonTags>> />
> <$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
> {{$:/core/images/done-button}}
> </$list>
> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
> <span class="tc-btn-text"><$text 
> text={{$:/gpqw/buttons/NewToDoHere/Caption}}/></span>
> </$list>
> </$button>
> \end
>
> <$set name="toDoTags" value="§todo">
> <$set name="currentTiddlerTag" value=<<currentTiddler>>>
> <<newToDoHereButton>>
> </$set></$set>
>
> I've set the "caption" field to "{{$:/core/images/done-button}} 
> {{$:/gpqw/buttons/NewToDoHere/Caption}}" and "description" to 
> {{$:/gpqw/buttons/NewToDoHere/Hint}} and added some text to the latter two 
> tiddlers. I've tagged the button tiddler ($:/gpqw/buttons/NewToDoHere) with 
> "$:/tags/ViewToolbar". I've added a tiddler named 
> "$:/config/ViewToolbarButtons/Visibility/$:/gpqw/buttons/NewToDoHere" and 
> set its text to "show" ("reveal" is suggested in the documentation but this 
> seems incorrect). I've also added the tiddler name to the list in 
> $:/tags/ViewToolbar.
>
> Although the button shows up as expected in the control panel, it does not 
> appear in the toolbar. I think I've followed the instructions to the best 
> of my ability. Could anyone help me pinpoint the problem?
>
>
> Best regards,
> Linus
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/14dc3ff9-0670-4a4d-ad58-9686898c508d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to