Here is the documentation for the set widget
http://tiddlywiki.com/#SetWidget

And you use it like

<$set name="constantname" value=((!!field}}>

</$set>

Then all the child elements of the tag (think xml), will have that variable
available to them. In a macro you can also use $(constantname)$ as a
placeholder, and the value will be inserted as is before the macro is
evaluated. I think it is a constant, meaning child elements can't change
it, but it will be updated if the value source changes, I believe.

That's one thing you will discover about this group. We might not have it
all together, but together we have it all.

Enjoy!
-Arlen

On Fri, Aug 11, 2017 at 12:27 AM, 'Mark S.' via TiddlyWiki <
[email protected]> wrote:

> Ok. There's a couple things going on. One a mistake. One a semi-bug. And
> one probably a slight UTF8 cut and paste error.
>
> In your application template, you forgot to close off <$wikify> with the
> closing </$wikify> tag. In addition, and I know this shouldn't really
> matter, but sometimes you need to stack your closing tags on top of each
> other instead of appending them to each other. That's a semi-bug IMHO.
> Anyway, your closing set of tags need to look like:
>
> </$set>
> </$set>
> </$set>
> </$wikify>
>
> If they're not stacked like this, the formatting below doesn't work right.
> Probably someone can explain why, but it's a mystery to me.
>
> Next, go to the "Edit and Save Field" tiddler and delete the existing
> $:/tags/Macro . There's something wrong with it. My guess is that you
> copied and pasted it from the forum, and it contains a hidden character.
> Type the $:/tags... again, and as you do the system should offer you
> $:/tags/Macro at the BOTTOM with the other system tiddlers. Select that
> $:/tags/Macro tag. ALSO, be sure to update the macro with the IMPROVED
> macro I provided (the one you have is the first draft).
>
> After these changes, the formatting and macro should function well enough
> to ... be tweaked.
>
> Have fun,
> Mark
>
>
>
> On Thursday, August 10, 2017 at 6:48:53 PM UTC-7, TonyM wrote:
>>
>> Mark,
>>
>> Sorry, but it is hard to explain what I want without reference to how to
>> accomplish it when there are a lot of terms I am still becomming familular
>> with.
>>
>> Of course I did ask at the top of the post "Edit fields in Current
>> Tiddler"
>>
>> I have published a version of my work at https://tiddlywiki.psat.com.au
>> use the table of contents to select applications and "application template"
>> tiddlers. The Bottom of which "application template" has some attempts to
>> use editnsave. Your replys suggest you do know what I need and Edit and
>> save may be the answer. I would like edit and save to reference fields in
>> the Application templaye (or its copies) and allow sub tiddlers (in tabs)
>> to use it as well. All  Most tiddlers are tagged "Object Dev".
>>
>> The Site itself is DRAFT only
>>
>> I have actualy spent more time building the demo than reinvestigating the
>> editnsave issue. But I have published to make it visible.
>>
>> I will look into it further after I get some real work done :)
>>
>> Regards
>> Tony
>>
>> On Friday, August 11, 2017 at 9:14:29 AM UTC+10, Mark S. wrote:
>>>
>>> It's better if you explain what it is that you want to accomplish than
>>> insist on how it gets accomplished.
>>>
>>> The variable <<currentTiddler>> is available to all "children" of a
>>> tiddler, assuming that by children you mean transcluded or templated
>>> tiddlers. If you have some other interpretation of what children are, then
>>> you need to explain what you want to accomplish.
>>>
>>> If you have a tiddler with several transclusions, and then clone that
>>> tiddler, all the transclusions of the clone will then use their
>>> <<currentTiddler>> value.
>>>
>>> Good luck,
>>> Mark
>>>
>>> On Thursday, August 10, 2017 at 3:52:30 PM UTC-7, TonyM wrote:
>>>>
>>>> A Quick description, I hope it helps
>>>>
>>>>
>>>> Psudo-Constants
>>>>
>>>> TiddlerA has a title or field name
>>>>
>>>> To set a constant you need to define a "variable" using the value of
>>>> the tiddler title or field, however when you use any reference to the title
>>>> or field it will be a string that refers to the field not the current value
>>>> of the field. As a result it gets wikified in context and may refer to
>>>> another tiddlers title or field depending on where it is used.
>>>>
>>>> I have used two variable names and wikify to partially solve this.
>>>> Quite cumbersome and it took time to find this solution. The ability to use
>>>> the constant still seems limited.
>>>>
>>>> \define currentobjectsrc()
>>>> {{!!title}}
>>>> \end
>>>> <$wikify name="currentobject" text=<<currentobjectsrc>>>
>>>>
>>>> I can now use the value in subtiddlers using <<currentobject>> but only
>>>> where this is valid. It retains its value (in this case "the text
>>>> "TiddlerA" in all subtiddlers, Can I use nested {{{}}} or something to make
>>>> this work in macros and filters ? I am still trying to learn the different
>>>> ways in the different widgets macros, template tiddler etc... Actually I
>>>> know the answer to this it is documented at tiddlywiki.com however it
>>>> is very contextual.
>>>>
>>>>
>>>> Perhaps there is a specific use of $set that is available to me, but I
>>>> have not found it yet. It would be great if I could use a simple command
>>>> like
>>>> <$set Constant=constantname value=((!!title}}>
>>>>
>>>> Such the constantname now contains "TiddlerA" and can be accessed by
>>>> various and consistent means in all subTiddlers (those called/Transcluded)
>>>> by TiddlerA
>>>>
>>>> To be clear I want to use {{!!title}} not {{TiddlerA!!title}} because I
>>>> do not want to hard code "TiddlerA" into the TiddlerA tiddler because when
>>>> cloned or copied it will have a new name or a different value in a field.
>>>>
>>>> I have found many of the documented syntax or examples refer to
>>>> "somename" rather than a name derived from a field, that does not change
>>>> with tiddler or context.
>>>>
>>>> I will try and publish into on my project soon, and perhaps there are
>>>> other ways do achieve what I am doing.
>>>>
>>>> I am now in the process of memorising a "dozen" "substitution rules" to
>>>> understand this.
>>>>
>>>> Thanks For the help.
>>>>
>>>> TonyM
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Friday, August 11, 2017 at 5:11:35 AM UTC+10, Danielo Rodríguez
>>>> wrote:
>>>>>
>>>>> I'm still not understand why the set widget does not work for you. It
>>>>> sets a variable with certain name and that variable is accessible to all
>>>>> it's children . How is your requirement different ?
>>>>
>>>> --
> 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/96b9dfe1-58f2-4dc3-9633-d6ac0d58812d%40googlegroups.com
> <https://groups.google.com/d/msgid/tiddlywiki/96b9dfe1-58f2-4dc3-9633-d6ac0d58812d%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 [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/CAJ1vdSSwPzZUaRHs6WRPwp89b91kFUD7-mHW%3DGiTcYa0K%2BurPw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to