OK. Tough to explain this one. I have a tiddler, *$:/_opNodeDetsEdit:*
<$tiddler tiddler="$:/_opNodeDetsEditText">
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor"/>
</$tiddler>
Which produces this:
[image: opNodesDetsEdit.png]
*$:/_opNodeDetsEditText* is just a blank 'holder' tiddler.
I transclude this into a tiddler called $:/_opAddNode so users can edit
without having to edit the tiddler itself. Transclude via:
Description: {{$:/_opNodeDetsEdit}}
Which produces:
[image: opNodesDetsEdit2.png]
Now, when I click "Create New" this produces a new tiddler based on a
template. The problem is - all the fields are populated properly apart from
that derived form the Description box. What gets put there is the value
*before* the current one (say in this example "goodbye cruel moon" was
there *before *"Hello World" "goodbye cruel moon" would get populated.
Consider the code that creates the new tiddler:
<!-- ADD NEW TIDDLER -->
<$wikify name="myfinal" text=<<final>> >
<$button popup="bob" >Create Item
<$action-setfield $tiddler="$:/_opTaskStore"
itemTitle=<<myfinal>>
desctext={{$:/_opNodeDetsEditText!!text}}
/>
<$set name="desctext" value={{$:/_opNodeDetsEditText!!text}}>
Desctext: <<desctext>>
<$action-setfield $tiddler="$:/_opEditNode"
title=<<myfinal>>
shorttext={{$:/_opTaskStore!!taskname}}
description=<<desctext>>
tags={{$:/_opTaskStore!!tags}}
nodetype= {{!!nodetype}}
tmap.id={{{ [[]make[%uuid%]] }}}
createdby={{!!createdby}}
managedby={{!!managedby}}
owner={{!!owner}}
assignedto={{!!assignedto}}
taskstatus={{!!taskstat}}
taskpercentage={{$:/_opTaskStore!!taskpercentage}}
color={{$:/_opTaskStore!!color}}
duedate = {{$:/_opTaskStore!!duedate}}
stalldate = {{$:/_opTaskStore!!stalldate}}
completiondate = {{$:/_opTaskStore!!completiondate}}
/>
<$reveal type='popup' state='bob' position='below'>
<div style='background-color:lightgreen'>
New Item created successfully:<br>
{{$:/_opTaskStore!!itemTitle}}<br>
<$link to={{$:/_opTaskStore!!itemTitle}}>Click to View</$link>
</div>
</$reveal>
<$action-setfield $tiddler="$:/_opTaskStore"
taskname=""
tags=""
taskpercentage=0
/>
<$action-setfield $tiddler="$:/_opNodeDetsEditText"
text=""
/>
</$set>
</$button>
</$wikify>
You can see I set a variable:
<$set name="desctext" value={{$:/_opNodeDetsEditText!!text}}>
As a debug I also print this live into the edit tiddler:
Desctext: <<desctext>>
Which renders the correct current version (see the picture above in the
button)
However, when I save exactly the same variable, I get the old version!?
Can anyone shed any light on what is progressively becoming one of the
highest dark arts of coding (i.e. TiddlyWiki!)
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/ac93b9c2-3dbd-40fd-87e1-7663f70a0263%40googlegroups.com.