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] https://jermolene.com > On 1 Apr 2018, at 02:40, TonyM <[email protected]> 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. .. 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]. > 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/37e60174-9969-4e4e-a699-929cb7994b17%40googlegroups.com. > 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/A75214A1-406F-43E1-9A79-AD6E07EB01D7%40gmail.com. For more options, visit https://groups.google.com/d/optout.
