Hey all,

Sorry a better example of what Im trying to accomplish:

<$button >
<$formula-vars val1="2+3" val2="<<val1>>+6" val3="{{!!t2}}+12">
<$action-setfield $field="t1" $value=<<val1>>/>
<$action-setfield $field="t2" $value=<<val2>>/>
<$action-setfield $field="t3" $value=<<val3>>/>
</$formula-vars>
Do it!
</$button>


I can understand why it wouldn't work, but it seems tobias' excellent 
setvars plugin will allow you to do something like this:


<$setvars
_attr1=<<currentTiddler>>
_attr2={{!!title}}
_attr3="1 2 3"
_attr4="[all[current]tagging[]]"
var1="attr1 \ = literal = \ attr2"
var2="attr3[n] \ \ [attr4[1,2][when-empty]] \ \ [attr3[][][ - ]]"
var3="if(attr1 ? [attr4]) || attr3 attr2"
var4="if(attr1 == attr2 ? attr3[1]) || [attr3[2]]">
* <<var1>>
* <<var2>>
* <<var3>>
* <<var4>>
</$setvars>


 Does formula let you do this type of cascading? 

On Thursday, February 1, 2018 at 2:32:34 PM UTC-6, Diego Mesa wrote:
>
> Hey all,
>
> I am trying to use this plugin in button actions like so:
>
> \define updateActions(newVal)
>> <$action-setfield $field="t1" $value="0"/>
>> <$action-setfield $field="t2" $value=$newVal$/>
>> <$action-setfield $field="t3" $value=(=3+1=)/>
>> <$action-setfield $field="t4" $value=(={{!!t3}}+20=)/>
>> \end
>>
>>
>> <$button actions=<<updateActions 10>> >
>> Do it!
>> </$button>
>>
>
>
> I am trying to make a spaced-repetition system like this. Any help would 
> be greately appreciated! 
>
>
> On Friday, January 19, 2018 at 2:44:29 PM UTC-6, Evan Balster wrote:
>>
>> Both formats look good, so I'll take the best parts of each:
>>
>>    - Unit tests:
>>       - Tiddlers tagged with FormulaTest.
>>       - Text is expected to render to TRUE
>>          - Advanced: If the field match is present on the tiddler, text 
>>          is instead expected to render to the same result as rendering 
>>          match.
>>       - Name using a prefix scheme based on the test subject
>>          - Bugs: FormulaTest/Regression/<Test Name>
>>          - Functions: FormulaTest/Functions/<Function Name>/<Test Name>
>>             - Function names in ALL CAPS
>>          - Language: FormulaTest/Feature/<Feature Name>/<Test Name>
>>             - Feature names being things like "Let", "Function", 
>>             "Closure", "Transclude"
>>          - Syntax & Compilation: FormulaTest/Compiler/<Feature 
>>          Name>/<Test Name>
>>          - Miscellaneous Tests: FormulaTest/Misc/<Test Name>
>>       - Additional tiddlers used as data in unit tests:
>>       - Tag with FormulaTestData.
>>       - Prefix with the unit test's fully-prefixed name, with an 
>>       additional slash and name.
>>    
>> Ideally, unit tests and bug repros should be submitted on GitHub (see my 
>> call for unit tests there 
>> <https://github.com/EvanBalster/TiddlyWikiFormula/issues/17>) but 
>> uploading JSON files in this thread is OK too.
>>
>> On Friday, 19 January 2018 10:37:43 UTC-6, Diego Mesa wrote:
>>>
>>> Hey Evan,
>>>
>>> I was going to start adding some more, but the format you described 
>>> above is slightly different than the previous one:
>>>
>>>
>>> http://evanbalster.com/tiddlywiki/formulas.html#UnitTest%2FFunctions%2Fnth%2Fsorted-return
>>>
>>> Which do you think we should stick with?
>>>
>>> Diego 
>>>
>>> On Friday, January 19, 2018 at 1:28:44 AM UTC-6, Evan Balster wrote:
>>>>
>>>> Bug(s) confirmed — array and date formatting aren't working correctly.  
>>>> Need to investigate why.
>>>>
>>>> There is also an issue with parsing block comments in Formula 0.2.1, 
>>>> which has been fixed in the repo.
>>>>
>>>> Suggested format for unit-test and bug-repro contributions:
>>>>
>>>>    - Tag with "FormulaTest"
>>>>    - Prefix "Test/"
>>>>    - Text comprises a single formula construct (of any type) whose 
>>>>    result should render to TRUE, *or* match the result of rendering field 
>>>>    "match" of the tiddler if present.
>>>>    - Submitted as JSON files here
>>>>
>>>>
>>>> On Thursday, 18 January 2018 22:18:55 UTC-6, Mr. Mal wrote:
>>>>>
>>>>> I think the now and date function not working in this release. May be 
>>>>> others can confirm this "bug". 
>>>>>
>>>>

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/79735907-0328-4d93-8914-c3bdd716064e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to