Mario and Jeremy,

Thanks for the feedback. Perhaps another possibility is custom fields. 

I have being thinking what If there were a pre and Post field permitted in 
tiddlers to allow <$vars > in Pre and </$vars> in post to wrap the Text 
field. 
If a multi-line field this would support local macro definition while 
leaving the text field free for transclusion as content buy other tiddler. 
This could include CSS definitions and more.

In keeping with this idea we could have* pre and post actions fields* in a 
given tiddler that are triggered on navigate to, or close. 
Being restrained to individual tiddlers, the possible errors are also 
constrained to individual tiddlers, however such fields could be populated 
with transclusions. 

I am trying to propose a very generic solution such that it becomes a 
feature (Plugin or core) that empowers mid level users, who are not able to 
readily access java script functions inside the core.

In the above cases it helps mid level users access more advanced features. 

One application that comes to mind in addition to the log actions, is more 
advanced field manipulation tools that allow the creation of new fields 
when they do not yet exist in a tiddler.
The Current method is to tag tiddlers with the view template and test every 
tiddler but if there were one pre and post tiddler test then this should 
reduce the amount of testing from the view template by pushing it into 
tiddlers.

Such opportunities in tiddlers makes tiddlers much more reusable because 
they can carry all they need in a single tiddler and Cary macros and field 
info when dragged to other wikis.

Just some ideas, Tell me how To further this if you support the ideas.

Regards
Tony


On Sunday, April 1, 2018 at 7:43:08 PM UTC+10, Jeremy Ruston wrote:
>
> Hi Tony
>
> I think it would be possible to have some actions that were triggered on 
> navigation.
>
> A nice general purpose way we could accomplish this might be a new 
> <$messagecatcher> widget that intercepts messages and triggers actions for 
> each one:
>
> <$messagecatcher tm-navigate=<<mynavigationactions>> 
> tm-close-iddler=<<mycloseactions>>>
> ...
> </$messagecatcher>
>
> To simplify the navigation actions use case, we might set things up so 
> that the page template triggers navigation actions on tiddlers tagged 
> $:/tags/NavigationActions
>
> Best wishes
>
> Jeremy
>
> --
> Jeremy Ruston
> [email protected] <javascript:>
> https://jermolene.com
>
> On 1 Apr 2018, at 02:40, TonyM <[email protected] <javascript:>> wrote:
>
> Mario,
>
> I have come to understand this, but my question is can we initiate actions 
> on opening, or clicking the link to a Tiddler, that is specific to that 
> tiddler? 
> Imagine 
>
>    - I append a date and Time to a subtiddler on opening the tiddler, and 
>    again on closing?
>    - Evaluate and Set a range of variables and field values which are 
>    then available to the tiddler including actions.
>
> Perhaps I am saying what about an on-click event for opening and closing a 
> tiddler? Surely this does not break the model? and happens on user 
> interaction?
>
> Regards
> Tony
>
> On Friday, March 30, 2018 at 7:33:32 PM UTC+11, PMario wrote:
>>
>> On Friday, March 30, 2018 at 3:56:51 AM UTC+2, TonyM wrote:
>>>
>>> Folks,
>>> This question may be from a place of ignorance, however can you tell me 
>>> why it appears fields can only be set from inside a triggering process such 
>>> as a button?
>>>
>>
>> That's right. TiddlyWiki is event-driven, because the browser is event 
>> driven. ... 
>>
>> Eg: 
>>  - clicking any element on the browser viewport will create a 
>> "click-event" ... 
>>  - This event starts at the element that is clicked. ... 
>>  - If the element doesn't handle it, it "bubbles up" to the parent ... 
>> and so on. 
>>  - If there is some code, that handles the event, something happens. ...
>>
>> A very common pattern for user interaction is clicking buttons. ... 
>> Handling button clicks is "cheap" since it only needs to happen on user 
>> interaction. Since users are "slow" compared to modern CPUs, "button based" 
>> interaction doesn't slow down the site performance. .... 
>>
>> A second common pattern is scrolling. ... Handling the "scroll-event" to 
>> see if something is visible is "expensive" eg: With my mouse wheel changing 
>> it 1 raster, creates about 40 scroll events. That's a page movement of 4 
>> lines. ... So handling very little things is ok. .. But going through the 
>> whole tiddler store and do something, will slow down the UI interaction. 
>>
>> .... That's why there is no user facing generic widgets, that uses the 
>> scroll event. .. They are always very specialized, to do exactly one thing 
>> fast! 
>>
>> eg: 
>> TiddlyMap has a "hotzone" widget. 
>> TW plugin "dynaview" handles "load, scroll, resize" events 
>>
>> Since working with those events can have a bad performance impact modern 
>> browsers created "native" observer functions 
>> <https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API>.
>>  
>> .. Most modern browser can use this mechanism. ... but as usual IE does 
>> not. ... So doing it the "compatible way" .. is not really suited for most 
>> users. 
>>
>> have fun!
>> mario
>>
>>
>>
>> -- 
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWikiDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] 
> <javascript:>.
> Visit this group at https://groups.google.com/group/tiddlywikidev.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywikidev/37e60174-9969-4e4e-a699-929cb7994b17%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywikidev/37e60174-9969-4e4e-a699-929cb7994b17%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 
"TiddlyWikiDev" 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/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/21e5f32a-e249-41de-b022-ec4279852577%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to