Mark, there is no issue with the action widgets. In fact try this in the 
above code: replace the value in the set widget with "some static text". 
Everything works as expected. That is, the setfield action sets the text  
of the new tiddler to <<table "some static text">> then navigates to it, 
then deletes the temp tiddler. The issue appears to be with the set widget. 
It is as if the set widget is parsed prior to any action widgets regardless 
of its location inside the button.


On Wednesday, December 11, 2019 at 7:41:45 PM UTC-6, Mark S. wrote:
>
> I would love it if I'm wrong, but in my experience you can't have the 
> changes created by one action widget then used by another action widget 
> inside the same trigger (button) widget. You would need a 2nd button for 
> the 2nd stage. Hopefully someone will pop up and prove me wrong ;-)
>
> On Wednesday, December 11, 2019 at 3:28:42 PM UTC-8, Alan Aldrich wrote:
>>
>> Hello everyone,
>> I am hoping someone can help me figure this out...
>>
>> Currently the *New Table* button in my plugin TiddlyTables 
>> <http://tiddlytables.tiddlyspot.com/>creates a new tiddler with 
>> *<<table>>* as its text. I would like that to instead be: *<<table 
>> "title of new tiddler">> *where "title of new tiddler" is the title 
>> generated by the action-createtiddler widget.
>>
>> Here is a basic version of what I am attempting:
>>
>> \define newTableText()
>> <<table "$(newTableTitle)$">>
>> \end
>> <$button>
>> <$action-createtiddler $basetitle="New Table"
>> $savetitle="$:/temp/title"
>> />
>> <$set name="newTableTitle" value={{$:/temp/title}} >
>> <$action-setfield $tiddler={{$:/temp/title}} text=<<newTableText>>/>
>> </$set>
>> <$action-navigate $to={{$:/temp/title}}/>
>> <$action-deletetiddler $tiddler="$:/temp/title"/>
>> New Table</$button>
>>
>> The problem seems to be with the set widget. I think the variable is 
>> getting assigned *before* $:/temp/title is created. Am I using the set 
>> widget incorrectly? Is there another way to accomplish this?
>>
>> Any help is greatly appreciated!
>> Alan
>>
>

-- 
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/df99081e-e5e8-4b97-a34e-b38ffa3b5c4b%40googlegroups.com.

Reply via email to