Hi Jed

> I would like to be able to pass the output of <$count filter='[all[]]'/>
to the macro as a parameter.

There is no way at the moment to store the results of wikifying text into a
variable or a tiddler. Transcluded attributes on widgets/HTML elements are
never wikified; the attribute gets the raw value of the variable or tiddler
field.

> I made a javascript macro that will return a random number in a given
range using a given step size

Did you see the earlier discussion about random number generation? Using a
macro is not a safe strategy. Because of the limitation that JS macros are
not refreshable, it'll work some of the time, but will cause problems in
some situations.

The key to remember is that the entire state of the wiki needs to be stored
in the tiddler store. The system needs to render exactly the same DOM
content for a given state of the tiddler store.

Best wishes

Jeremy.





On Mon, Nov 24, 2014 at 8:35 AM, Tobias Beer <[email protected]> wrote:

> \define getCount() <$count filter='[all[]]'/>
>> <$button><$action-setfield $field=myField $value=<<getCount>>/>Set
>> field</$button>
>>
>
> You're right, that doesn't appear to work and I am thinking that 
> action-setfield
> might just not be polished all the way.
>
> Could well be a bug, although I would have thought that the evaluation
> pattern would be the same throughout widgets, action widgets or otherwise.
>
> I did some experimentation here...
>
> http://tbdemo.tiddlyspot.com/#Count%20Filter%20Deferred%20To%20Macro
>
> And I tested way more than that, e.g. passing variables or macro
> parameters, etc... all to no avail.
>
> Best wishes, Tobias.
>
> --
> 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 post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jeremy Ruston
mailto:[email protected]

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to