Discussion:
[tw] TW5 So lost i need a map.
m***@gmail.com
2017-08-10 14:15:50 UTC
Raw Message
I thought i had finally wrapped my head around the difference between $var$
and $(var)$, so i went to test it.
Below is my test, and I am at a complete loss for why buttontest1 renders
the markup instead of the button, and why buttontest2, when pressed,
creates a tiddler that is the exact markup of <<myStateTid>>.
While calling <<myStateTid>> by itself renders as expected.

Please, someone explain this to me.. perhaps using small words. :)

\define myStateTid() """$:/state/$(currentTiddler)$""" \define buttontest1() <$button set="$(myStateTid)$" setTo="edit">Press1</$button> \end \define buttontest2() <$button set=<<myStateTid>> setTo="edit">Press2</$button> \end <<buttontest1>> <<buttontest2>> -- 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 tiddlywiki+***@googlegroups.com. To post to this group, send email to ***@googlegroups.com. 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/045ac19a-8c0a-43b4-ab5b-70eb555c44a0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. Arlen Beiler 2017-08-10 14:40:43 UTC Permalink Raw Message Try this: \define myStateTid2() """$:/state/$(currentTiddler)$"""

\define buttontest1()
<$button set=$(myStateTid)$setTo="edit1">Press1</$button>
\end

\define buttontest2()
<$button set=<<myStateTid>> setTo="edit2">Press2</$button>
\end

<<myStateTid2>>

<$set name="myStateTid" value=<<myStateTid2>>> <<myStateTid>> <<buttontest1>> <<buttontest2>> </$set>
Post by m***@gmail.com
I thought i had finally wrapped my head around the difference between
$var$ and $(var)$, so i went to test it.
Below is my test, and I am at a complete loss for why buttontest1 renders
the markup instead of the button, and why buttontest2, when pressed,
creates a tiddler that is the exact markup of <<myStateTid>>.
While calling <<myStateTid>> by itself renders as expected.
Please, someone explain this to me.. perhaps using small words. :)
\define myStateTid() """$:/state/$(currentTiddler)$""" \define buttontest1() <$button set="$(myStateTid)$" setTo="edit">Press1</$button> \end \define buttontest2() <$button set=<<myStateTid>> setTo="edit">Press2</$button> \end <<buttontest1>> <<buttontest2>> -- 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 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/045ac19a-8c0a-43b4-ab5b-70eb555c44a0%40googlegroups.com <https://groups.google.com/d/msgid/tiddlywiki/045ac19a-8c0a-43b4-ab5b-70eb555c44a0%40googlegroups.com?utm_medium=email&utm_source=footer> . For more options, visit https://groups.google.com/d/optout. -- 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 tiddlywiki+***@googlegroups.com. To post to this group, send email to ***@googlegroups.com. 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/CAJ1vdSSxFhFg4NdSnuju6ENomsf7B%3DxOpZM_gK6D%3DRxjocB0Mg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. Arlen Beiler 2017-08-10 14:45:51 UTC Permalink Raw Message Check this out, it's a little different: \define myStateTid2()$:/state/$(currentTiddler)$

\define buttontest1()
<$button set="$(myStateTid)$" setTo="edit1">Press1</$button>
\end

\define buttontest2()
<$button set=<<myStateTid>> setTo="edit2">Press2</$button>
\end

<<myStateTid2>>

<$set name="myStateTid" value=<<myStateTid2>>> <<myStateTid>> <<buttontest1>> <<buttontest2>> <$button set=<<myStateTid>> setTo="edit3">Press3</$button> Post by Arlen Beiler \define myStateTid2() """$:/state/$(currentTiddler)$"""
\define buttontest1()
<$button set=$(myStateTid)$setTo="edit1">Press1</$button>
\end
\define buttontest2()
<$button set=<<myStateTid>> setTo="edit2">Press2</$button>
\end
<<myStateTid2>>
<$set name="myStateTid" value=<<myStateTid2>>> <<myStateTid>> <<buttontest1>> <<buttontest2>> </$set>
Post by m***@gmail.com
I thought i had finally wrapped my head around the difference between
$var$ and $(var)$, so i went to test it.
Below is my test, and I am at a complete loss for why buttontest1 renders
the markup instead of the button, and why buttontest2, when pressed,
creates a tiddler that is the exact markup of <<myStateTid>>.
While calling <<myStateTid>> by itself renders as expected.
Please, someone explain this to me.. perhaps using small words. :)
\define myStateTid() """$:/state/$(currentTiddler)$""" \define buttontest1() <$button set="$(myStateTid)$" setTo="edit">Press1</$button> \end \define buttontest2() <$button set=<<myStateTid>> setTo="edit">Press2</$button> \end <<buttontest1>> <<buttontest2>> -- 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 Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/ms gid/tiddlywiki/045ac19a-8c0a-43b4-ab5b-70eb555c44a0%40googlegroups.com <https://groups.google.com/d/msgid/tiddlywiki/045ac19a-8c0a-43b4-ab5b-70eb555c44a0%40googlegroups.com?utm_medium=email&utm_source=footer> . For more options, visit https://groups.google.com/d/optout. -- 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 tiddlywiki+***@googlegroups.com. To post to this group, send email to ***@googlegroups.com. 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/CAJ1vdSRd1K5gSUpqyFvZdo8fwv%3DwA27WZHRkWLL5OVMViSpTYw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. 'Mark S.' via TiddlyWiki 2017-08-10 16:28:49 UTC Permalink Raw Message When you use the$(variable)$construction inside a macro, it substitutes the text literally, without rendering. So when the #*#@&* DO things render? And how do you control it? This is the kind of thing that can make you bang your head against the wall for hours. Fortunately, we now have the <$wikify> widget. The <$wikify> widget renders the text it is given, allowing a more sane programming flow. So your code can now be written: \define myStateTid() """$:/state/$(currentTiddler)$"""

\define buttontest2()
<$wikify name=hawaii text=<<myStateTid>>> <$button set=<<hawaii>> setTo="edit">Press2</$button></$wikify>
\end

<<buttontest2>>

HTH
Mark
Post by m***@gmail.com
I thought i had finally wrapped my head around the difference between
$var$ and $(var)$, so i went to test it.
Below is my test, and I am at a complete loss for why buttontest1 renders
the markup instead of the button, and why buttontest2, when pressed,
creates a tiddler that is the exact markup of <<myStateTid>>.
While calling <<myStateTid>> by itself renders as expected.
Please, someone explain this to me.. perhaps using small words. :)
\define myStateTid() """$:/state/$(currentTiddler)$""" \define buttontest1() <$button set="$(myStateTid)$" setTo="edit">Press1</$button> \end \define buttontest2() <$button set=<<myStateTid>> setTo="edit">Press2</$button> \end <<buttontest1>> <<buttontest2>> -- 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 tiddlywiki+***@googlegroups.com. To post to this group, send email to ***@googlegroups.com. 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/64bcffe9-584d-4570-b36d-f600ae2ae61a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. m***@gmail.com 2017-08-11 20:21:14 UTC Permalink Raw Message Thanks for the info everyone. Now that i understand it better, i'm using these almost like constants. rather than having each macro have to determine what the data tiddler, and state tiddler is i define them once via the macros. and i am finding that being able to reference the values inside other macros as$(macro)$is sometimes more flexible than <<macro>>. I'm learning that 99% of my troubles come from being unable to use <<macro>> inside quotes and similar issues w/ tiddler titles having spaces in them Post by 'Mark S.' via TiddlyWiki When you use the$(variable)$construction inside a macro, it substitutes the text literally, without rendering. the kind of thing that can make you bang your head against the wall for hours. Fortunately, we now have the <$wikify> widget. The <$wikify> widget renders the text it is given, allowing a more sane programming flow. So \define myStateTid() """$:/state/$(currentTiddler)$"""
\define buttontest2()
<$wikify name=hawaii text=<<myStateTid>>> <$button set=<<hawaii>> setTo="edit">Press2</$button></$wikify>
\end
<<buttontest2>>
HTH
Mark
Post by m***@gmail.com
I thought i had finally wrapped my head around the difference between
$var$ and $(var)$, so i went to test it.
Below is my test, and I am at a complete loss for why buttontest1 renders
the markup instead of the button, and why buttontest2, when pressed,
creates a tiddler that is the exact markup of <<myStateTid>>.
While calling <<myStateTid>> by itself renders as expected.
Please, someone explain this to me.. perhaps using small words. :)
\define myStateTid() """$:/state/$(currentTiddler)$""" \define buttontest1() <$button set="$(myStateTid)$" setTo="edit">Press1</$button> \end \define buttontest2() <$button set=<<myStateTid>> setTo="edit">Press2</$button> \end <<buttontest1>> <<buttontest2>> -- 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 tiddlywiki+***@googlegroups.com. To post to this group, send email to ***@googlegroups.com. 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/de6c8088-1c18-4292-946d-c14d073be76f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. Arlen Beiler 2017-08-11 20:23:39 UTC Permalink Raw Message Tiddler titles with spaces may either be surrounded with quotes or double square brackets, depending on your needs. [[My Tiddler]] -Arlen Post by m***@gmail.com Thanks for the info everyone. Now that i understand it better, i'm using these almost like constants. rather than having each macro have to determine what the data tiddler, and state tiddler is i define them once via the macros. and i am finding that being able to reference the values inside other macros as$(macro)$is sometimes more flexible than <<macro>>. I'm learning that 99% of my troubles come from being unable to use <<macro>> inside quotes and similar issues w/ tiddler titles having spaces in them Post by 'Mark S.' via TiddlyWiki When you use the$(variable)$construction inside a macro, it substitutes the text literally, without rendering. the kind of thing that can make you bang your head against the wall for hours. Fortunately, we now have the <$wikify> widget. The <$wikify> widget renders the text it is given, allowing a more sane programming flow. So \define myStateTid() """$:/state/$(currentTiddler)$"""
\define buttontest2()
<$wikify name=hawaii text=<<myStateTid>>> <$button set=<<hawaii>> setTo="edit">Press2</$button></$wikify>
\end
<<buttontest2>>
HTH
Mark
Post by m***@gmail.com
I thought i had finally wrapped my head around the difference between
$var$ and $(var)$, so i went to test it.
Below is my test, and I am at a complete loss for why buttontest1
renders the markup instead of the button, and why buttontest2, when
pressed, creates a tiddler that is the exact markup of <<myStateTid>>.
While calling <<myStateTid>> by itself renders as expected.
Please, someone explain this to me.. perhaps using small words. :)
\define myStateTid() """$:/state/$(currentTiddler)$""" \define buttontest1() <$button set="$(myStateTid)$" setTo="edit">Press1</$button> \end \define buttontest2() <$button set=<<myStateTid>> setTo="edit">Press2</\$button>
\end
<<buttontest1>>
<<buttontest2>>
--
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