Jeremy! Many thanks for clarification!
Best wishes Mohammad On Tue, Jun 22, 2021 at 11:31 PM Jeremy Ruston <[email protected]> wrote: > The issue here is that JS macros are supposed to always return the same > result when passed the same parameters (in computer science terms, JS > macros are supposed to be deterministic). > > It is possible to use JS macros that are non-deterministic, but they will > cause the refresh mechanism to produce unexpected results. > > I can't tell without understanding more about your code, but the solution > may be refactoring the functionality as either a widget or a filter > operator. > > Best wishes > > Jeremy > > > > -- > Jeremy Ruston > [email protected] > https://jermolene.com > > On 22 Jun 2021, at 19:53, Mohammad Rahmani <[email protected]> > wrote: > > > > > On Tue, Jun 22, 2021 at 4:28 PM Atronoush <[email protected]> wrote: > >> >> There are some tag cloud tools around (e.g. Eric uses size and Mohammad >> use badge). >> I like to have tag cloud based on color! >> >> IDEA >> i. a macro to get a number and generate a color, I call it *colgen* >> this is easy! in surface plots / contour plots we use color bars! here >> different color tables can be used in form of macro or dictionary tiddler >> >> ii. a variable to calculate the number of tiddlers (e.g using $count) >> tagged with say *foo* >> >> How it works >> 1. each time a new tiddler is tagged with foo the variable value is >> increased by one >> 2. this value is passed to *colgen* macro to generate color >> 3. this color is dynamically used for tag >> >> you can use different color tables/bar for example red for high and blue >> for low (rainbow color table), ... >> >> >> ISSUE >> Tiddlywiki allow to use macros and transclusion in fields! BUT it seems >> it does not allow to change color dynamically! >> > > I think this is a bug! But maybe Jeremy or other developers can explain! > BUT the below code does not work for me! > > <$button> Set Color > <$action-setfield $tiddler=testc $field=color $value=rgb(255,0,0)/> > </$button> > > or > <$button> Set Color > <$action-setfield $tiddler=testc $field=color $value="yellow"/> > </$button> > >> >> >> I appreciate to have your idea, solution, codes, ... >> >> --Atro >> >> -- >> 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/8dfb1056-4081-4b77-8d82-18ad9bda7e42n%40googlegroups.com >> <https://groups.google.com/d/msgid/tiddlywiki/8dfb1056-4081-4b77-8d82-18ad9bda7e42n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > 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/CAAV1gMCP_tKogwVj4D3Mm_UMmF8x4ZkGfnb4tXROSE7yn7y1Fw%40mail.gmail.com > <https://groups.google.com/d/msgid/tiddlywiki/CAAV1gMCP_tKogwVj4D3Mm_UMmF8x4ZkGfnb4tXROSE7yn7y1Fw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > -- > 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/7E404A08-8547-4ECE-AD82-369858F46F65%40gmail.com > <https://groups.google.com/d/msgid/tiddlywiki/7E404A08-8547-4ECE-AD82-369858F46F65%40gmail.com?utm_medium=email&utm_source=footer> > . > -- 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/CAAV1gMCUO3V1Op8kYGLmC6NRM0wsA3s51QnSnoHpUbF10sXtnA%40mail.gmail.com.

