Hey guys,

it is me again. Still working on my website and coming up with another 
problem. I still can not completely wrap my head around how to achieve some 
simple - at least I think they are - things. I am writing a plugin for my 
site to track my beekeeping and therefore made a button which "creates" a 
new hive and increments a global counter.

However since this whole thing should be a plugin I do not want to store a 
"counter" within the sidebar tiddler containing the button but rather have 
a "state" tiddler handling this as there are a couple of things I want to 
increment (queens, hives, checks...). My problem is that I do not know how 
to "get" the value from the state tiddler in the first place so I can 
increment it and set the new value (increment macro does work).

As of now I have this (what do I have to insert at the question marks?):

<$button>New Hive

    <$set name="counter" value=<<increment ???>>>
>         <$action-sendmessage $message="tm-new-tiddler" title=Hive 
> #<<counter>> tags="active Hive" />
>
>     <$action-setfield $tiddler="$:/state/beehive" $field="hiveCounter" 
> $value=<<counter>> />
>
>     </$set>
> </$button>
>

Thanks in advance.
Cheers,
Tristan

-- 
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/92f7dc78-0a8a-4478-b5a9-d8af9bb4e1c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to