[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-24 Thread 'Mark S.' via TiddlyWiki
So now that 5.1.23, I can post the example I've been working on:

https://marxsal.github.io/various/playground.html#Excise%20from%20View%20Template%20Example

If you look at the code, you'll see that I have to use a tiddler that's 
made in advance of the drag/drop routine. The tiddler that's made during 
the routine is not available for use inside the routine.



On Saturday, December 19, 2020 at 6:46:51 AM UTC-8 Mark S. wrote:

> I'm not using a button. I'm using droppable. So all actions are happening 
> inside an action macro.
>
> The button example was only an example, and I'm afraid has confused the 
> issue. Ignore what happens with buttons.
> On Saturday, December 19, 2020 at 1:55:40 AM UTC-8 PMario wrote:
>
>> @Mark Use button actions like this, 
>>
>> \define actions()
>> ALL action widgets come here
>> \end
>>
>> <$button actions=<> >click
>>
>> Otherwise you beg for trouble.
>>
>> -mario
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/bc46c57c-5b71-4d90-8919-6c368de510d7n%40googlegroups.com.


[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-19 Thread 'Mark S.' via TiddlyWiki
I'm not using a button. I'm using droppable. So all actions are happening 
inside an action macro.

The button example was only an example, and I'm afraid has confused the 
issue. Ignore what happens with buttons.
On Saturday, December 19, 2020 at 1:55:40 AM UTC-8 PMario wrote:

> @Mark Use button actions like this, 
>
> \define actions()
> ALL action widgets come here
> \end
>
> <$button actions=<> >click
>
> Otherwise you beg for trouble.
>
> -mario
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/31669d3a-c6cd-4979-b332-0c65976e03a2n%40googlegroups.com.


[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-19 Thread Michael Wiktowy

@PMario

I guess the quirk is with <$fieldmangler> ... I think in particular if it 
has a transcluded tiddler=. It executes first ... even when everything is 
put into actions= as you suggest. But several workarounds were identified 
that either:

1) avoid using the add-tag message (and consequently avoided using 
fieldmangler) by concatenating tags using filters/transfusion/variables 

or;

2) split action lists into two groups (possible only using the 
ButtonWidget) that are forces them to execute serially so that you can make 
fieldmangler go last.

/Mike
On Saturday, December 19, 2020 at 5:55:40 AM UTC-4 PMario wrote:

> @Mark Use button actions like this, 
>
> \define actions()
> ALL action widgets come here
> \end
>
> <$button actions=<> >click
>
> Otherwise you beg for trouble.
>
> -mario
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/d024f29a-ecca-4c21-a98a-9b343910b900n%40googlegroups.com.


[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-19 Thread PMario
@Mark Use button actions like this, 

\define actions()
ALL action widgets come here
\end

<$button actions=<> >click

Otherwise you beg for trouble.

-mario

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2cdef081-939b-4f42-bd6e-f784db09c033n%40googlegroups.com.


[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-18 Thread Michael Wiktowy
Try this:

<$button>
<$action-setfield $tiddler="$:/savedtitle" text="" />
<$action-createtiddler $basetitle="Secret" $savetitle="$:/savedtitle" 
tags="Excerpt" text="do you see me now 2?" />

<$action-setfield $tiddler="testtiddler" text={{$:/savedtitle}} />


*<$fieldmangler tiddler={{$:/savedtitle}}><$action-sendmessage 
$message="tm-add-tag" $param={{$:/savedtitle}}/>*
<$action-navigate $to={{$:/savedtitle}}/>
Go


testtiddler: {{testtiddler}}

saved title {{$:/savedtitle}} 

$:/savedtitle [[testtiddler]]

I think the problem occurs when you have to use fieldmangler to send 
messages. Fieldmangler seems to fire first before anything else.

You'd expect the tiddler created by action-createtiddler to be tagged with 
itself. It doesn't unless you run that same fieldmangler with actions= 
separately. With droppable you don't have that option. It will only run 
actions= macros.

/Mike

On Saturday, December 19, 2020 at 12:28:47 AM UTC-4 TW Tones wrote:

> Well here is my test on the pre-release.
>
> <$button>
> <$action-setfield $tiddler="$:/savedtitle" text="" />
> <$action-createtiddler $basetitle="Secret" $savetitle="$:/savedtitle" 
> tags="Excerpt" text="do you see me now 2?" />
> <$action-setfield $tiddler="testtiddler" text={{$:/savedtitle}} />
> <$action-navigate $to={{$:/savedtitle}}/>
> Go
> 
>
> testtiddler: {{testtiddler}} saved title {{$:/savedtitle}} $:/savedtitle 
> [[testtiddler]]
>
> It seems to me to be doing what is expected of it.
>
>- Each time I click it generates the tiddler and updates testtiddler 
>with the current new title.
>- So yes the $:/savedtitle is available to the second setfield.
>- I clear the $:/savedtitle first as a demo but it is not necessary.
>
> Tones
> On Saturday, 19 December 2020 at 15:10:08 UTC+11 Mark S. wrote:
>
>> Ok, the navigation actually occurs AFTER the entire routine has finished. 
>> Inside the routine, the value of the saved tiddler is unavailable.
>>
>> To see this, try this variation:
>>
>> <$button>
>> <$action-createtiddler $basetitle="Secret" $savetitle="$:/savedtitle" 
>> tags="Excerpt" text="do you see me now 2?" />
>> <$action-setfield $tiddler="testtiddler" text={{$:/savedtitle}} />
>> <$action-navigate $to={{$:/savedtitle}}/>
>> Go
>> 
>>
>> testtiddler: {{testtiddler}}
>>
>> When you press go, the contents of testtiddler will be the *prior* (if 
>> there were any) contents of $:/savedtitle, not the one's generated during 
>> the routine.
>>
>>
>> On Friday, December 18, 2020 at 6:24:11 PM UTC-8 TW Tones wrote:
>>
>>> Folks,
>>>
>>> I may be missing something here, or perhaps 5.1.23 has reverted 
>>> (untested by me yet), but I cant help but feel these posts are 
>>> miss-representing things somehow.
>>>
>>> The drop actions do add complexity to this but inside a single button I 
>>> have used createtiddler then referenced the save title as a variable and 
>>> used it elsewhere.
>>> However if one determines a base title that does not exist yet, then the 
>>> save title will always be the same and you don't even need to access it. 
>>> Just use the first title to used for base title. If multiple tiddlers are 
>>> written they should receive a number increment tiddlername 1, tiddlername 2 
>>> etc... in which case they all have the prefix tiddlername. Knowing this if 
>>> you want you can rename them. 
>>>
>>> In the pre-release
>>> <$button>
>>> <$action-createtiddler $basetitle="Excerpt" $savetitle="$:/savedtitle" 
>>> tags="Excerpt" text=<> />
>>> <$action-navigate $to={{$:/savedtitle}}/>
>>> Go
>>> 
>>>
>>> This works, and it can only do so if the $:/savedtitle is correct when 
>>> the action-navigate is done.
>>> So how can the OT of marks say? *The title saved in $:/savetitle 
>>> doesn't become available until AFTER the routine it is in finishes. This 
>>> means it is too late to be used by other widgets inside of the same 
>>> routine/macro.*
>>> If becomes available immediately after the createTiddler action how can 
>>> this be true?
>>>
>>> Tones
>>>
>>>
>>> On Friday, 18 December 2020 at 17:02:34 UTC+11 mwik...@gmail.com wrote:
>>>
 The problem is highlighted by something like this:

 \define dropaction()
 <$action-createtiddler $basetitle=<> />
 <$list 
 filter="[all[tiddlers]search:titlesort[created]last[]]" 
 variable="lastcreated">
 <$fieldmangler tiddler=<>>
 <$action-sendmessage $message="tm-add-tag" $param=<>/>
 
 
 \end

 <$droppable actions=<>>Some area to drop on
 

 ... this brute-force approach doesn't work and will tag the second from 
 last one since the action-createtiddler doesn't create a tiddler until the 
 entire action is done.

 None of these work now but maybe one of these solutions could be 
 adopted in the core:
 1) the DroppableWidget could be made to act more like the ButtonWidget 
 in that actions within the widget are triggered so <$droppable 
 actions=<> >  <>   would work. 
 Right 

[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-18 Thread 'Mark S.' via TiddlyWiki
BTW, what I'm working on is a tool that will let you select your text in 
the view template, drag and drop it to the drop zone in the sidebar, and 
automatically insert a link or transclusion into the place in the 
viewtemplate where the original text occurred. In other words, it works 
like excision, but without being in edit mode.

On Friday, December 18, 2020 at 8:56:10 PM UTC-8 Mark S. wrote:

> Ok, I think I'm back to "doesn't work with dropping." Might have to 
> revisit tomorrow.
>
> Thanks!
>
> On Friday, December 18, 2020 at 8:28:47 PM UTC-8 TW Tones wrote:
>
>> Well here is my test on the pre-release.
>>
>> <$button>
>> <$action-setfield $tiddler="$:/savedtitle" text="" />
>> <$action-createtiddler $basetitle="Secret" $savetitle="$:/savedtitle" 
>> tags="Excerpt" text="do you see me now 2?" />
>> <$action-setfield $tiddler="testtiddler" text={{$:/savedtitle}} />
>> <$action-navigate $to={{$:/savedtitle}}/>
>> Go
>> 
>>
>> testtiddler: {{testtiddler}} saved title {{$:/savedtitle}} $:/savedtitle 
>> [[testtiddler]]
>>
>> It seems to me to be doing what is expected of it.
>>
>>- Each time I click it generates the tiddler and updates testtiddler 
>>with the current new title.
>>- So yes the $:/savedtitle is available to the second setfield.
>>- I clear the $:/savedtitle first as a demo but it is not necessary.
>>
>> Tones
>> On Saturday, 19 December 2020 at 15:10:08 UTC+11 Mark S. wrote:
>>
>>> Ok, the navigation actually occurs AFTER the entire routine has 
>>> finished. Inside the routine, the value of the saved tiddler is unavailable.
>>>
>>> To see this, try this variation:
>>>
>>> <$button>
>>> <$action-createtiddler $basetitle="Secret" $savetitle="$:/savedtitle" 
>>> tags="Excerpt" text="do you see me now 2?" />
>>> <$action-setfield $tiddler="testtiddler" text={{$:/savedtitle}} />
>>> <$action-navigate $to={{$:/savedtitle}}/>
>>> Go
>>> 
>>>
>>> testtiddler: {{testtiddler}}
>>>
>>> When you press go, the contents of testtiddler will be the *prior* (if 
>>> there were any) contents of $:/savedtitle, not the one's generated during 
>>> the routine.
>>>
>>>
>>> On Friday, December 18, 2020 at 6:24:11 PM UTC-8 TW Tones wrote:
>>>
 Folks,

 I may be missing something here, or perhaps 5.1.23 has reverted 
 (untested by me yet), but I cant help but feel these posts are 
 miss-representing things somehow.

 The drop actions do add complexity to this but inside a single button I 
 have used createtiddler then referenced the save title as a variable and 
 used it elsewhere.
 However if one determines a base title that does not exist yet, then 
 the save title will always be the same and you don't even need to access 
 it. Just use the first title to used for base title. If multiple tiddlers 
 are written they should receive a number increment tiddlername 1, 
 tiddlername 2 etc... in which case they all have the prefix tiddlername. 
 Knowing this if you want you can rename them. 

 In the pre-release
 <$button>
 <$action-createtiddler $basetitle="Excerpt" $savetitle="$:/savedtitle" 
 tags="Excerpt" text=<> />
 <$action-navigate $to={{$:/savedtitle}}/>
 Go
 

 This works, and it can only do so if the $:/savedtitle is correct when 
 the action-navigate is done.
 So how can the OT of marks say? *The title saved in $:/savetitle 
 doesn't become available until AFTER the routine it is in finishes. This 
 means it is too late to be used by other widgets inside of the same 
 routine/macro.*
 If becomes available immediately after the createTiddler action how can 
 this be true?

 Tones


 On Friday, 18 December 2020 at 17:02:34 UTC+11 mwik...@gmail.com wrote:

> The problem is highlighted by something like this:
>
> \define dropaction()
> <$action-createtiddler $basetitle=<> />
> <$list 
> filter="[all[tiddlers]search:titlesort[created]last[]]" 
> variable="lastcreated">
> <$fieldmangler tiddler=<>>
> <$action-sendmessage $message="tm-add-tag" $param=<>/>
> 
> 
> \end
>
> <$droppable actions=<>>Some area to drop on
> 
>
> ... this brute-force approach doesn't work and will tag the second 
> from last one since the action-createtiddler doesn't create a tiddler 
> until 
> the entire action is done.
>
> None of these work now but maybe one of these solutions could be 
> adopted in the core:
> 1) the DroppableWidget could be made to act more like the ButtonWidget 
> in that actions within the widget are triggered so <$droppable 
> actions=<> >  <>   would 
> work. 
> Right now only <> trigger.
>
> 2) DroppableWidgets (and ButtonWidgets) could be make nestable with 
> inner widgets completing before outer ones so that you can have 
> constructs 
> like:
>
> <$droppable actions=<>>
> ...
> <$droppable 

[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-18 Thread 'Mark S.' via TiddlyWiki
Ok, I think I'm back to "doesn't work with dropping." Might have to revisit 
tomorrow.

Thanks!

On Friday, December 18, 2020 at 8:28:47 PM UTC-8 TW Tones wrote:

> Well here is my test on the pre-release.
>
> <$button>
> <$action-setfield $tiddler="$:/savedtitle" text="" />
> <$action-createtiddler $basetitle="Secret" $savetitle="$:/savedtitle" 
> tags="Excerpt" text="do you see me now 2?" />
> <$action-setfield $tiddler="testtiddler" text={{$:/savedtitle}} />
> <$action-navigate $to={{$:/savedtitle}}/>
> Go
> 
>
> testtiddler: {{testtiddler}} saved title {{$:/savedtitle}} $:/savedtitle 
> [[testtiddler]]
>
> It seems to me to be doing what is expected of it.
>
>- Each time I click it generates the tiddler and updates testtiddler 
>with the current new title.
>- So yes the $:/savedtitle is available to the second setfield.
>- I clear the $:/savedtitle first as a demo but it is not necessary.
>
> Tones
> On Saturday, 19 December 2020 at 15:10:08 UTC+11 Mark S. wrote:
>
>> Ok, the navigation actually occurs AFTER the entire routine has finished. 
>> Inside the routine, the value of the saved tiddler is unavailable.
>>
>> To see this, try this variation:
>>
>> <$button>
>> <$action-createtiddler $basetitle="Secret" $savetitle="$:/savedtitle" 
>> tags="Excerpt" text="do you see me now 2?" />
>> <$action-setfield $tiddler="testtiddler" text={{$:/savedtitle}} />
>> <$action-navigate $to={{$:/savedtitle}}/>
>> Go
>> 
>>
>> testtiddler: {{testtiddler}}
>>
>> When you press go, the contents of testtiddler will be the *prior* (if 
>> there were any) contents of $:/savedtitle, not the one's generated during 
>> the routine.
>>
>>
>> On Friday, December 18, 2020 at 6:24:11 PM UTC-8 TW Tones wrote:
>>
>>> Folks,
>>>
>>> I may be missing something here, or perhaps 5.1.23 has reverted 
>>> (untested by me yet), but I cant help but feel these posts are 
>>> miss-representing things somehow.
>>>
>>> The drop actions do add complexity to this but inside a single button I 
>>> have used createtiddler then referenced the save title as a variable and 
>>> used it elsewhere.
>>> However if one determines a base title that does not exist yet, then the 
>>> save title will always be the same and you don't even need to access it. 
>>> Just use the first title to used for base title. If multiple tiddlers are 
>>> written they should receive a number increment tiddlername 1, tiddlername 2 
>>> etc... in which case they all have the prefix tiddlername. Knowing this if 
>>> you want you can rename them. 
>>>
>>> In the pre-release
>>> <$button>
>>> <$action-createtiddler $basetitle="Excerpt" $savetitle="$:/savedtitle" 
>>> tags="Excerpt" text=<> />
>>> <$action-navigate $to={{$:/savedtitle}}/>
>>> Go
>>> 
>>>
>>> This works, and it can only do so if the $:/savedtitle is correct when 
>>> the action-navigate is done.
>>> So how can the OT of marks say? *The title saved in $:/savetitle 
>>> doesn't become available until AFTER the routine it is in finishes. This 
>>> means it is too late to be used by other widgets inside of the same 
>>> routine/macro.*
>>> If becomes available immediately after the createTiddler action how can 
>>> this be true?
>>>
>>> Tones
>>>
>>>
>>> On Friday, 18 December 2020 at 17:02:34 UTC+11 mwik...@gmail.com wrote:
>>>
 The problem is highlighted by something like this:

 \define dropaction()
 <$action-createtiddler $basetitle=<> />
 <$list 
 filter="[all[tiddlers]search:titlesort[created]last[]]" 
 variable="lastcreated">
 <$fieldmangler tiddler=<>>
 <$action-sendmessage $message="tm-add-tag" $param=<>/>
 
 
 \end

 <$droppable actions=<>>Some area to drop on
 

 ... this brute-force approach doesn't work and will tag the second from 
 last one since the action-createtiddler doesn't create a tiddler until the 
 entire action is done.

 None of these work now but maybe one of these solutions could be 
 adopted in the core:
 1) the DroppableWidget could be made to act more like the ButtonWidget 
 in that actions within the widget are triggered so <$droppable 
 actions=<> >  <>   would work. 
 Right now only <> trigger.

 2) DroppableWidgets (and ButtonWidgets) could be make nestable with 
 inner widgets completing before outer ones so that you can have constructs 
 like:

 <$droppable actions=<>>
 ...
 <$droppable actions=<>>
 <$droppable actions=<>>Some area to drop on
 
 
 ...
 

 3) ActionCreateTiddlerWidget could have a variable scope that acts 
 like <$fieldmangler> to do things like: 
 <$action-createtiddler $basetitle="Created Tiddler">

 <>
 

 ... however having the name won't help if the tiddler isn't created 
 until the end.

 Some potential RFEs ... none of which I have the skill to implement.

 /Mike

 On Friday, December 18, 2020 at 12:18:14 AM UTC-4 Mark S. 

[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-18 Thread TW Tones
Well here is my test on the pre-release.

<$button>
<$action-setfield $tiddler="$:/savedtitle" text="" />
<$action-createtiddler $basetitle="Secret" $savetitle="$:/savedtitle" 
tags="Excerpt" text="do you see me now 2?" />
<$action-setfield $tiddler="testtiddler" text={{$:/savedtitle}} />
<$action-navigate $to={{$:/savedtitle}}/>
Go


testtiddler: {{testtiddler}} saved title {{$:/savedtitle}} $:/savedtitle 
[[testtiddler]]

It seems to me to be doing what is expected of it.

   - Each time I click it generates the tiddler and updates testtiddler 
   with the current new title.
   - So yes the $:/savedtitle is available to the second setfield.
   - I clear the $:/savedtitle first as a demo but it is not necessary.

Tones
On Saturday, 19 December 2020 at 15:10:08 UTC+11 Mark S. wrote:

> Ok, the navigation actually occurs AFTER the entire routine has finished. 
> Inside the routine, the value of the saved tiddler is unavailable.
>
> To see this, try this variation:
>
> <$button>
> <$action-createtiddler $basetitle="Secret" $savetitle="$:/savedtitle" 
> tags="Excerpt" text="do you see me now 2?" />
> <$action-setfield $tiddler="testtiddler" text={{$:/savedtitle}} />
> <$action-navigate $to={{$:/savedtitle}}/>
> Go
> 
>
> testtiddler: {{testtiddler}}
>
> When you press go, the contents of testtiddler will be the *prior* (if 
> there were any) contents of $:/savedtitle, not the one's generated during 
> the routine.
>
>
> On Friday, December 18, 2020 at 6:24:11 PM UTC-8 TW Tones wrote:
>
>> Folks,
>>
>> I may be missing something here, or perhaps 5.1.23 has reverted (untested 
>> by me yet), but I cant help but feel these posts are miss-representing 
>> things somehow.
>>
>> The drop actions do add complexity to this but inside a single button I 
>> have used createtiddler then referenced the save title as a variable and 
>> used it elsewhere.
>> However if one determines a base title that does not exist yet, then the 
>> save title will always be the same and you don't even need to access it. 
>> Just use the first title to used for base title. If multiple tiddlers are 
>> written they should receive a number increment tiddlername 1, tiddlername 2 
>> etc... in which case they all have the prefix tiddlername. Knowing this if 
>> you want you can rename them. 
>>
>> In the pre-release
>> <$button>
>> <$action-createtiddler $basetitle="Excerpt" $savetitle="$:/savedtitle" 
>> tags="Excerpt" text=<> />
>> <$action-navigate $to={{$:/savedtitle}}/>
>> Go
>> 
>>
>> This works, and it can only do so if the $:/savedtitle is correct when 
>> the action-navigate is done.
>> So how can the OT of marks say? *The title saved in $:/savetitle doesn't 
>> become available until AFTER the routine it is in finishes. This means it 
>> is too late to be used by other widgets inside of the same routine/macro.*
>> If becomes available immediately after the createTiddler action how can 
>> this be true?
>>
>> Tones
>>
>>
>> On Friday, 18 December 2020 at 17:02:34 UTC+11 mwik...@gmail.com wrote:
>>
>>> The problem is highlighted by something like this:
>>>
>>> \define dropaction()
>>> <$action-createtiddler $basetitle=<> />
>>> <$list 
>>> filter="[all[tiddlers]search:titlesort[created]last[]]" 
>>> variable="lastcreated">
>>> <$fieldmangler tiddler=<>>
>>> <$action-sendmessage $message="tm-add-tag" $param=<>/>
>>> 
>>> 
>>> \end
>>>
>>> <$droppable actions=<>>Some area to drop on
>>> 
>>>
>>> ... this brute-force approach doesn't work and will tag the second from 
>>> last one since the action-createtiddler doesn't create a tiddler until the 
>>> entire action is done.
>>>
>>> None of these work now but maybe one of these solutions could be adopted 
>>> in the core:
>>> 1) the DroppableWidget could be made to act more like the ButtonWidget 
>>> in that actions within the widget are triggered so <$droppable 
>>> actions=<> >  <>   would work. 
>>> Right now only <> trigger.
>>>
>>> 2) DroppableWidgets (and ButtonWidgets) could be make nestable with 
>>> inner widgets completing before outer ones so that you can have constructs 
>>> like:
>>>
>>> <$droppable actions=<>>
>>> ...
>>> <$droppable actions=<>>
>>> <$droppable actions=<>>Some area to drop on
>>> 
>>> 
>>> ...
>>> 
>>>
>>> 3) ActionCreateTiddlerWidget could have a variable scope that acts like 
>>> <$fieldmangler> to do things like: 
>>> <$action-createtiddler $basetitle="Created Tiddler">
>>>
>>> <>
>>> 
>>>
>>> ... however having the name won't help if the tiddler isn't created 
>>> until the end.
>>>
>>> Some potential RFEs ... none of which I have the skill to implement.
>>>
>>> /Mike
>>>
>>> On Friday, December 18, 2020 at 12:18:14 AM UTC-4 Mark S. wrote:
>>>
 On Thursday, December 17, 2020 at 7:33:30 PM UTC-8 TW Tones wrote:

>
>
> Otherwise; *accept or generate the new tiddler name before  
> $action-createtiddler  *
>  
>

 This somewhat obviates the utility of the $savetitle attribute, since 
 the results are not available 

[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-18 Thread 'Mark S.' via TiddlyWiki
Ok, the navigation actually occurs AFTER the entire routine has finished. 
Inside the routine, the value of the saved tiddler is unavailable.

To see this, try this variation:

<$button>
<$action-createtiddler $basetitle="Secret" $savetitle="$:/savedtitle" 
tags="Excerpt" text="do you see me now 2?" />
<$action-setfield $tiddler="testtiddler" text={{$:/savedtitle}} />
<$action-navigate $to={{$:/savedtitle}}/>
Go


testtiddler: {{testtiddler}}

When you press go, the contents of testtiddler will be the *prior* (if 
there were any) contents of $:/savedtitle, not the one's generated during 
the routine.


On Friday, December 18, 2020 at 6:24:11 PM UTC-8 TW Tones wrote:

> Folks,
>
> I may be missing something here, or perhaps 5.1.23 has reverted (untested 
> by me yet), but I cant help but feel these posts are miss-representing 
> things somehow.
>
> The drop actions do add complexity to this but inside a single button I 
> have used createtiddler then referenced the save title as a variable and 
> used it elsewhere.
> However if one determines a base title that does not exist yet, then the 
> save title will always be the same and you don't even need to access it. 
> Just use the first title to used for base title. If multiple tiddlers are 
> written they should receive a number increment tiddlername 1, tiddlername 2 
> etc... in which case they all have the prefix tiddlername. Knowing this if 
> you want you can rename them. 
>
> In the pre-release
> <$button>
> <$action-createtiddler $basetitle="Excerpt" $savetitle="$:/savedtitle" 
> tags="Excerpt" text=<> />
> <$action-navigate $to={{$:/savedtitle}}/>
> Go
> 
>
> This works, and it can only do so if the $:/savedtitle is correct when the 
> action-navigate is done.
> So how can the OT of marks say? *The title saved in $:/savetitle doesn't 
> become available until AFTER the routine it is in finishes. This means it 
> is too late to be used by other widgets inside of the same routine/macro.*
> If becomes available immediately after the createTiddler action how can 
> this be true?
>
> Tones
>
>
> On Friday, 18 December 2020 at 17:02:34 UTC+11 mwik...@gmail.com wrote:
>
>> The problem is highlighted by something like this:
>>
>> \define dropaction()
>> <$action-createtiddler $basetitle=<> />
>> <$list 
>> filter="[all[tiddlers]search:titlesort[created]last[]]" 
>> variable="lastcreated">
>> <$fieldmangler tiddler=<>>
>> <$action-sendmessage $message="tm-add-tag" $param=<>/>
>> 
>> 
>> \end
>>
>> <$droppable actions=<>>Some area to drop on
>> 
>>
>> ... this brute-force approach doesn't work and will tag the second from 
>> last one since the action-createtiddler doesn't create a tiddler until the 
>> entire action is done.
>>
>> None of these work now but maybe one of these solutions could be adopted 
>> in the core:
>> 1) the DroppableWidget could be made to act more like the ButtonWidget in 
>> that actions within the widget are triggered so <$droppable 
>> actions=<> >  <>   would work. 
>> Right now only <> trigger.
>>
>> 2) DroppableWidgets (and ButtonWidgets) could be make nestable with inner 
>> widgets completing before outer ones so that you can have constructs like:
>>
>> <$droppable actions=<>>
>> ...
>> <$droppable actions=<>>
>> <$droppable actions=<>>Some area to drop on
>> 
>> 
>> ...
>> 
>>
>> 3) ActionCreateTiddlerWidget could have a variable scope that acts like 
>> <$fieldmangler> to do things like: 
>> <$action-createtiddler $basetitle="Created Tiddler">
>>
>> <>
>> 
>>
>> ... however having the name won't help if the tiddler isn't created until 
>> the end.
>>
>> Some potential RFEs ... none of which I have the skill to implement.
>>
>> /Mike
>>
>> On Friday, December 18, 2020 at 12:18:14 AM UTC-4 Mark S. wrote:
>>
>>> On Thursday, December 17, 2020 at 7:33:30 PM UTC-8 TW Tones wrote:
>>>


 Otherwise; *accept or generate the new tiddler name before  
 $action-createtiddler  *
  

>>>
>>> This somewhat obviates the utility of the $savetitle attribute, since 
>>> the results are not available  until the containing process is completed.
>>>
>>> So, for instance, you couldn't catch use $savetitle to create a 
>>> reference in another tiddler to the newly created tiddler until the process 
>>> is done. Meaning, at best, that the user has to push a button for a second 
>>> time for no apparent reason. (not apparent to the user, in any case).
>>>
>>>
>>>
>>>  
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/95109736-dbda-4ea4-8d3b-d3d828b29c88n%40googlegroups.com.


[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-18 Thread TW Tones
Mark,

Maybe with drop action, but as you can see action navigate is only using a 
transclusion, I can even use  {{$:/savedtitle}}  in the button title or 
after.
With a qualified save title the last title can be stored indefinitely as 
well, so I find it hard to imagine.

What were you trying to achieve with the drop action?

I am currently experimenting with building a generic list handling tool, I 
already have buttons on the viewToolbar that accept drag, click and drop, 
and I do not recall this limitations.
Perhaps its the order the actions are executed or the difference between 
inline actions and actions=<>

Tones

On Saturday, 19 December 2020 at 14:47:53 UTC+11 Mark S. wrote:

> Perhaps action-navigate works differently than action-setfield, or perhaps 
> everything works differently with a drop action.
>
> On Friday, December 18, 2020 at 6:24:11 PM UTC-8 TW Tones wrote:
>
>> Folks,
>>
>> I may be missing something here, or perhaps 5.1.23 has reverted (untested 
>> by me yet), but I cant help but feel these posts are miss-representing 
>> things somehow.
>>
>> The drop actions do add complexity to this but inside a single button I 
>> have used createtiddler then referenced the save title as a variable and 
>> used it elsewhere.
>> However if one determines a base title that does not exist yet, then the 
>> save title will always be the same and you don't even need to access it. 
>> Just use the first title to used for base title. If multiple tiddlers are 
>> written they should receive a number increment tiddlername 1, tiddlername 2 
>> etc... in which case they all have the prefix tiddlername. Knowing this if 
>> you want you can rename them. 
>>
>> In the pre-release
>> <$button>
>> <$action-createtiddler $basetitle="Excerpt" $savetitle="$:/savedtitle" 
>> tags="Excerpt" text=<> />
>> <$action-navigate $to={{$:/savedtitle}}/>
>> Go
>> 
>>
>> This works, and it can only do so if the $:/savedtitle is correct when 
>> the action-navigate is done.
>> So how can the OT of marks say? *The title saved in $:/savetitle doesn't 
>> become available until AFTER the routine it is in finishes. This means it 
>> is too late to be used by other widgets inside of the same routine/macro.*
>> If becomes available immediately after the createTiddler action how can 
>> this be true?
>>
>> Tones
>>
>>
>> On Friday, 18 December 2020 at 17:02:34 UTC+11 mwik...@gmail.com wrote:
>>
>>> The problem is highlighted by something like this:
>>>
>>> \define dropaction()
>>> <$action-createtiddler $basetitle=<> />
>>> <$list 
>>> filter="[all[tiddlers]search:titlesort[created]last[]]" 
>>> variable="lastcreated">
>>> <$fieldmangler tiddler=<>>
>>> <$action-sendmessage $message="tm-add-tag" $param=<>/>
>>> 
>>> 
>>> \end
>>>
>>> <$droppable actions=<>>Some area to drop on
>>> 
>>>
>>> ... this brute-force approach doesn't work and will tag the second from 
>>> last one since the action-createtiddler doesn't create a tiddler until the 
>>> entire action is done.
>>>
>>> None of these work now but maybe one of these solutions could be adopted 
>>> in the core:
>>> 1) the DroppableWidget could be made to act more like the ButtonWidget 
>>> in that actions within the widget are triggered so <$droppable 
>>> actions=<> >  <>   would work. 
>>> Right now only <> trigger.
>>>
>>> 2) DroppableWidgets (and ButtonWidgets) could be make nestable with 
>>> inner widgets completing before outer ones so that you can have constructs 
>>> like:
>>>
>>> <$droppable actions=<>>
>>> ...
>>> <$droppable actions=<>>
>>> <$droppable actions=<>>Some area to drop on
>>> 
>>> 
>>> ...
>>> 
>>>
>>> 3) ActionCreateTiddlerWidget could have a variable scope that acts like 
>>> <$fieldmangler> to do things like: 
>>> <$action-createtiddler $basetitle="Created Tiddler">
>>>
>>> <>
>>> 
>>>
>>> ... however having the name won't help if the tiddler isn't created 
>>> until the end.
>>>
>>> Some potential RFEs ... none of which I have the skill to implement.
>>>
>>> /Mike
>>>
>>> On Friday, December 18, 2020 at 12:18:14 AM UTC-4 Mark S. wrote:
>>>
 On Thursday, December 17, 2020 at 7:33:30 PM UTC-8 TW Tones wrote:

>
>
> Otherwise; *accept or generate the new tiddler name before  
> $action-createtiddler  *
>  
>

 This somewhat obviates the utility of the $savetitle attribute, since 
 the results are not available  until the containing process is completed.

 So, for instance, you couldn't catch use $savetitle to create a 
 reference in another tiddler to the newly created tiddler until the 
 process 
 is done. Meaning, at best, that the user has to push a button for a second 
 time for no apparent reason. (not apparent to the user, in any case).



  

>>>

-- 
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 

[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-18 Thread 'Mark S.' via TiddlyWiki
Perhaps action-navigate works differently than action-setfield, or perhaps 
everything works differently with a drop action.

On Friday, December 18, 2020 at 6:24:11 PM UTC-8 TW Tones wrote:

> Folks,
>
> I may be missing something here, or perhaps 5.1.23 has reverted (untested 
> by me yet), but I cant help but feel these posts are miss-representing 
> things somehow.
>
> The drop actions do add complexity to this but inside a single button I 
> have used createtiddler then referenced the save title as a variable and 
> used it elsewhere.
> However if one determines a base title that does not exist yet, then the 
> save title will always be the same and you don't even need to access it. 
> Just use the first title to used for base title. If multiple tiddlers are 
> written they should receive a number increment tiddlername 1, tiddlername 2 
> etc... in which case they all have the prefix tiddlername. Knowing this if 
> you want you can rename them. 
>
> In the pre-release
> <$button>
> <$action-createtiddler $basetitle="Excerpt" $savetitle="$:/savedtitle" 
> tags="Excerpt" text=<> />
> <$action-navigate $to={{$:/savedtitle}}/>
> Go
> 
>
> This works, and it can only do so if the $:/savedtitle is correct when the 
> action-navigate is done.
> So how can the OT of marks say? *The title saved in $:/savetitle doesn't 
> become available until AFTER the routine it is in finishes. This means it 
> is too late to be used by other widgets inside of the same routine/macro.*
> If becomes available immediately after the createTiddler action how can 
> this be true?
>
> Tones
>
>
> On Friday, 18 December 2020 at 17:02:34 UTC+11 mwik...@gmail.com wrote:
>
>> The problem is highlighted by something like this:
>>
>> \define dropaction()
>> <$action-createtiddler $basetitle=<> />
>> <$list 
>> filter="[all[tiddlers]search:titlesort[created]last[]]" 
>> variable="lastcreated">
>> <$fieldmangler tiddler=<>>
>> <$action-sendmessage $message="tm-add-tag" $param=<>/>
>> 
>> 
>> \end
>>
>> <$droppable actions=<>>Some area to drop on
>> 
>>
>> ... this brute-force approach doesn't work and will tag the second from 
>> last one since the action-createtiddler doesn't create a tiddler until the 
>> entire action is done.
>>
>> None of these work now but maybe one of these solutions could be adopted 
>> in the core:
>> 1) the DroppableWidget could be made to act more like the ButtonWidget in 
>> that actions within the widget are triggered so <$droppable 
>> actions=<> >  <>   would work. 
>> Right now only <> trigger.
>>
>> 2) DroppableWidgets (and ButtonWidgets) could be make nestable with inner 
>> widgets completing before outer ones so that you can have constructs like:
>>
>> <$droppable actions=<>>
>> ...
>> <$droppable actions=<>>
>> <$droppable actions=<>>Some area to drop on
>> 
>> 
>> ...
>> 
>>
>> 3) ActionCreateTiddlerWidget could have a variable scope that acts like 
>> <$fieldmangler> to do things like: 
>> <$action-createtiddler $basetitle="Created Tiddler">
>>
>> <>
>> 
>>
>> ... however having the name won't help if the tiddler isn't created until 
>> the end.
>>
>> Some potential RFEs ... none of which I have the skill to implement.
>>
>> /Mike
>>
>> On Friday, December 18, 2020 at 12:18:14 AM UTC-4 Mark S. wrote:
>>
>>> On Thursday, December 17, 2020 at 7:33:30 PM UTC-8 TW Tones wrote:
>>>


 Otherwise; *accept or generate the new tiddler name before  
 $action-createtiddler  *
  

>>>
>>> This somewhat obviates the utility of the $savetitle attribute, since 
>>> the results are not available  until the containing process is completed.
>>>
>>> So, for instance, you couldn't catch use $savetitle to create a 
>>> reference in another tiddler to the newly created tiddler until the process 
>>> is done. Meaning, at best, that the user has to push a button for a second 
>>> time for no apparent reason. (not apparent to the user, in any case).
>>>
>>>
>>>
>>>  
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f4f6ee9f-2f56-420e-ba42-d8b4a87e75cen%40googlegroups.com.


[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-18 Thread TW Tones
Folks,

I may be missing something here, or perhaps 5.1.23 has reverted (untested 
by me yet), but I cant help but feel these posts are miss-representing 
things somehow.

The drop actions do add complexity to this but inside a single button I 
have used createtiddler then referenced the save title as a variable and 
used it elsewhere.
However if one determines a base title that does not exist yet, then the 
save title will always be the same and you don't even need to access it. 
Just use the first title to used for base title. If multiple tiddlers are 
written they should receive a number increment tiddlername 1, tiddlername 2 
etc... in which case they all have the prefix tiddlername. Knowing this if 
you want you can rename them. 

In the pre-release
<$button>
<$action-createtiddler $basetitle="Excerpt" $savetitle="$:/savedtitle" 
tags="Excerpt" text=<> />
<$action-navigate $to={{$:/savedtitle}}/>
Go


This works, and it can only do so if the $:/savedtitle is correct when the 
action-navigate is done.
So how can the OT of marks say? *The title saved in $:/savetitle doesn't 
become available until AFTER the routine it is in finishes. This means it 
is too late to be used by other widgets inside of the same routine/macro.*
If becomes available immediately after the createTiddler action how can 
this be true?

Tones


On Friday, 18 December 2020 at 17:02:34 UTC+11 mwik...@gmail.com wrote:

> The problem is highlighted by something like this:
>
> \define dropaction()
> <$action-createtiddler $basetitle=<> />
> <$list 
> filter="[all[tiddlers]search:titlesort[created]last[]]" 
> variable="lastcreated">
> <$fieldmangler tiddler=<>>
> <$action-sendmessage $message="tm-add-tag" $param=<>/>
> 
> 
> \end
>
> <$droppable actions=<>>Some area to drop on
> 
>
> ... this brute-force approach doesn't work and will tag the second from 
> last one since the action-createtiddler doesn't create a tiddler until the 
> entire action is done.
>
> None of these work now but maybe one of these solutions could be adopted 
> in the core:
> 1) the DroppableWidget could be made to act more like the ButtonWidget in 
> that actions within the widget are triggered so <$droppable 
> actions=<> >  <>   would work. 
> Right now only <> trigger.
>
> 2) DroppableWidgets (and ButtonWidgets) could be make nestable with inner 
> widgets completing before outer ones so that you can have constructs like:
>
> <$droppable actions=<>>
> ...
> <$droppable actions=<>>
> <$droppable actions=<>>Some area to drop on
> 
> 
> ...
> 
>
> 3) ActionCreateTiddlerWidget could have a variable scope that acts like 
> <$fieldmangler> to do things like: 
> <$action-createtiddler $basetitle="Created Tiddler">
>
> <>
> 
>
> ... however having the name won't help if the tiddler isn't created until 
> the end.
>
> Some potential RFEs ... none of which I have the skill to implement.
>
> /Mike
>
> On Friday, December 18, 2020 at 12:18:14 AM UTC-4 Mark S. wrote:
>
>> On Thursday, December 17, 2020 at 7:33:30 PM UTC-8 TW Tones wrote:
>>
>>>
>>>
>>> Otherwise; *accept or generate the new tiddler name before  
>>> $action-createtiddler  *
>>>  
>>>
>>
>> This somewhat obviates the utility of the $savetitle attribute, since the 
>> results are not available  until the containing process is completed.
>>
>> So, for instance, you couldn't catch use $savetitle to create a reference 
>> in another tiddler to the newly created tiddler until the process is done. 
>> Meaning, at best, that the user has to push a button for a second time for 
>> no apparent reason. (not apparent to the user, in any case).
>>
>>
>>
>>  
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/6b5545c9-42bd-47f5-b544-755b403676dcn%40googlegroups.com.


[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-17 Thread Michael Wiktowy
The problem is highlighted by something like this:

\define dropaction()
<$action-createtiddler $basetitle=<> />
<$list 
filter="[all[tiddlers]search:titlesort[created]last[]]" 
variable="lastcreated">
<$fieldmangler tiddler=<>>
<$action-sendmessage $message="tm-add-tag" $param=<>/>


\end

<$droppable actions=<>>Some area to drop on


... this brute-force approach doesn't work and will tag the second from 
last one since the action-createtiddler doesn't create a tiddler until the 
entire action is done.

None of these work now but maybe one of these solutions could be adopted in 
the core:
1) the DroppableWidget could be made to act more like the ButtonWidget in 
that actions within the widget are triggered so <$droppable 
actions=<> >  <>   would work. 
Right now only <> trigger.

2) DroppableWidgets (and ButtonWidgets) could be make nestable with inner 
widgets completing before outer ones so that you can have constructs like:

<$droppable actions=<>>
...
<$droppable actions=<>>
<$droppable actions=<>>Some area to drop on


...


3) ActionCreateTiddlerWidget could have a variable scope that acts like 
<$fieldmangler> to do things like: 
<$action-createtiddler $basetitle="Created Tiddler">
<>


... however having the name won't help if the tiddler isn't created until 
the end.

Some potential RFEs ... none of which I have the skill to implement.

/Mike

On Friday, December 18, 2020 at 12:18:14 AM UTC-4 Mark S. wrote:

> On Thursday, December 17, 2020 at 7:33:30 PM UTC-8 TW Tones wrote:
>
>>
>>
>> Otherwise; *accept or generate the new tiddler name before  
>> $action-createtiddler  *
>>  
>>
>
> This somewhat obviates the utility of the $savetitle attribute, since the 
> results are not available  until the containing process is completed.
>
> So, for instance, you couldn't catch use $savetitle to create a reference 
> in another tiddler to the newly created tiddler until the process is done. 
> Meaning, at best, that the user has to push a button for a second time for 
> no apparent reason. (not apparent to the user, in any case).
>
>
>
>  
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c0714637-67e0-434c-8a14-585d60d9076cn%40googlegroups.com.


[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-17 Thread 'Mark S.' via TiddlyWiki


On Thursday, December 17, 2020 at 7:33:30 PM UTC-8 TW Tones wrote:

>
>
> Otherwise; *accept or generate the new tiddler name before  
> $action-createtiddler  *
>  
>

This somewhat obviates the utility of the $savetitle attribute, since the 
results are not available  until the containing process is completed.

So, for instance, you couldn't catch use $savetitle to create a reference 
in another tiddler to the newly created tiddler until the process is done. 
Meaning, at best, that the user has to push a button for a second time for 
no apparent reason. (not apparent to the user, in any case).



 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a7405ffe-3ca8-4b46-8f9a-ef0f855a5a39n%40googlegroups.com.


[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-17 Thread TW Tones
<$action-createtiddler  allows you to created tiddlers "silently", you then 
use as Mario said  tm-navigate or even edit tiddler ( tm-edit-tiddler ) , 
when you can rename it.
Before opening it to edit where you could rename it, the $savetitle remains 
valid and you could use it to perform other operations on the new tiddler, 
although much can be done within the  action-createtiddler  such as setting 
any field value. 

Otherwise; *accept or generate the new tiddler name before  
$action-createtiddler  *
 
Tones
On Friday, 18 December 2020 at 13:27:52 UTC+11 Mark S. wrote:

> That's an interesting idea. But tm-link-to doesn't show up anywhere in the 
> documentation, or a search in system or shadows. Are you sure it exists yet?
>
> Thanks!
>
> On Thursday, December 17, 2020 at 6:12:12 PM UTC-8 PMario wrote:
>
>> Hi Mark, 
>> You may be able to use the <$linkcatcher widget to trigger a new action. 
>> ...
>>
>> So your first action define the $savetitle  ... and a second actions 
>> sends a tm-link-to, which is catched by the linkcatcher actions. It should 
>> / may be available. 
>>
>> With 5.1.23 there is a new 
>> https://tiddlywiki.com/prerelease/#EventCatcherWidget, which I didn't 
>> test yet. 
>>
>> -m
>>
>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/e64945b6-db0f-4b3a-a30b-26ecc2370e28n%40googlegroups.com.


[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-17 Thread 'Mark S.' via TiddlyWiki
That's an interesting idea. But tm-link-to doesn't show up anywhere in the 
documentation, or a search in system or shadows. Are you sure it exists yet?

Thanks!

On Thursday, December 17, 2020 at 6:12:12 PM UTC-8 PMario wrote:

> Hi Mark, 
> You may be able to use the <$linkcatcher widget to trigger a new action. 
> ...
>
> So your first action define the $savetitle  ... and a second actions sends 
> a tm-link-to, which is catched by the linkcatcher actions. It should / may 
> be available. 
>
> With 5.1.23 there is a new 
> https://tiddlywiki.com/prerelease/#EventCatcherWidget, which I didn't 
> test yet. 
>
> -m
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/e32c0c10-a4ad-44f7-a186-b7287867e5b8n%40googlegroups.com.


[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-17 Thread PMario
On Friday, December 18, 2020 at 3:12:12 AM UTC+1 PMario wrote:

So your first action define the $savetitle  ... and a second actions sends 
> a tm-link-to, which is catched by the linkcatcher actions. It should / may 
> be available. 
>

I meant tm-navigate ...

-m

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f169aaa4-a8e5-453f-a531-ec86fee220f9n%40googlegroups.com.


[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-17 Thread PMario
Hi Mark, 
You may be able to use the <$linkcatcher widget to trigger a new action. ...

So your first action define the $savetitle  ... and a second actions sends 
a tm-link-to, which is catched by the linkcatcher actions. It should / may 
be available. 

With 5.1.23 there is a new 
https://tiddlywiki.com/prerelease/#EventCatcherWidget, which I didn't test 
yet. 

-m


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/8ae8da96-0470-4c69-bbe4-a171bf08e812n%40googlegroups.com.


[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-17 Thread 'Mark S.' via TiddlyWiki
In this case there is no button -- it's being triggered by a drop event 
onto a droppable widget.

Thanks!

On Thursday, December 17, 2020 at 5:22:40 PM UTC-8 Eric Shulman wrote:

> On Thursday, December 17, 2020 at 4:07:38 PM UTC-8 Mark S. wrote:
>
>> In prerelease 5.23, if I run something like:
>> <$action-createtiddler $basetitle="Excerpt" $savetitle="$:/savedtitle" 
>> tags="Excerpt" text=<> />
>> The title saved in $:/savetitle doesn't become available until AFTER the 
>> routine it is in finishes. This means it is too late to be used by other 
>> widgets inside of the same routine/macro.
>> I feel like this problem was encountered before, and there was some sort 
>> of fix for it. Does anyone remember what that might be? Or if it's 
>> something that's a known problem?
>>
>
> A $button can actually invoke two sets of action widgets:
>
> First, when clicked, any action widgets that occur in the body of the 
> button are invoked.
> Then, if the $button has an actions="..." parameter, those actions are 
> invoked afterwards.
>
> Thus, you can do something like:
>
> <$button actions="""<$action-setfield $title={{$:/savedtitle}} ... />""">
>click me
><$action-createtiddler $basetitle="..." $savetitle="$:/savedtitle" 
> etc... />
> 
>
> note that, for readability, you could also define separate macros for each 
> set of actions, and then invoke them like this:
>
> \define buttonactions_1() <$action-createtiddler $basetitle="..." 
> $savetitle="$:/savedtitle" etc... />
> \define buttonactions_2() <$action-setfield $title={{$:/savedtitle}} ... />
>
> <$button actions=<>> click me <> 
> 
>
> -e
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2921dda6-10ff-4279-af8e-34de86897821n%40googlegroups.com.


[tw5] Re: Saved title for action-createtiddler only available AFTER run ?

2020-12-17 Thread Eric Shulman


On Thursday, December 17, 2020 at 4:07:38 PM UTC-8 Mark S. wrote:

> In prerelease 5.23, if I run something like:
> <$action-createtiddler $basetitle="Excerpt" $savetitle="$:/savedtitle" 
> tags="Excerpt" text=<> />
> The title saved in $:/savetitle doesn't become available until AFTER the 
> routine it is in finishes. This means it is too late to be used by other 
> widgets inside of the same routine/macro.
> I feel like this problem was encountered before, and there was some sort 
> of fix for it. Does anyone remember what that might be? Or if it's 
> something that's a known problem?
>

A $button can actually invoke two sets of action widgets:

First, when clicked, any action widgets that occur in the body of the 
button are invoked.
Then, if the $button has an actions="..." parameter, those actions are 
invoked afterwards.

Thus, you can do something like:

<$button actions="""<$action-setfield $title={{$:/savedtitle}} ... />""">
   click me
   <$action-createtiddler $basetitle="..." $savetitle="$:/savedtitle" 
etc... />


note that, for readability, you could also define separate macros for each 
set of actions, and then invoke them like this:

\define buttonactions_1() <$action-createtiddler $basetitle="..." 
$savetitle="$:/savedtitle" etc... />
\define buttonactions_2() <$action-setfield $title={{$:/savedtitle}} ... />

<$button actions=<>> click me <> 


-e

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a611aa74-c489-4c02-900b-78c56542566dn%40googlegroups.com.