Hi Philippe,

Can you share your version of the day-diff.js macro?

I notice that there is a small typographical error in Eric's post. It's the 
double arrow at the end of the first <$reveal> widget. Perhaps you caught 
that?

Good luck!
Mark

On Tuesday, November 1, 2016 at 5:36:43 AM UTC-7, Philippe Le Toquin wrote:
>
> HI Eric,
>
> I have tried you method but it is still not working. It is better in the 
> sense that it doesn't print the part I only want to print when it matches 
> but even when it is matching it still stays invisible. The only way to 
> reveal is to set type to nomatch.
>  :(
>
> Philippe
>
> On Tuesday, 1 November 2016 00:12:48 UTC, Eric Shulman wrote:
>>
>> On Monday, October 31, 2016 at 3:45:29 PM UTC-7, Philippe Le Toquin wrote:
>>>
>>> What I would ideally like to do is that the text in red (to be 
>>> discarded) only appears if the return of the macro is YES.
>>> I would like to use the RevealWidget but can't make it works. Here is 
>>> what I tried
>>> * <$link to={{!!title}}><$view field="title"/> </$link> <$reveal 
>>> type="match" state="<$macrocall $name="day-left" 
>>> bestbefore={{!!bestbefore}} />" text="YES">@@color:red;( to be 
>>> discarded )@@ </$reveal>
>>> but the result of that is not working. Instead it displays:
>>>
>>
>> While the "text" param can contain any desired text, macro call, or 
>> transclusion syntax, the "state" param can only be used to specify a 
>> TextReference (i.e., a target tiddler field or a DataTiddler property in 
>> which to store the current state value).
>>
>> To use a macro value instead of a stored state value, *omit* the "state" 
>> param entirely and use the "default" param instead... something like this:
>>
>> <$reveal type="match" default=<<day-left bestbefore={{!!bestbefore}}>> 
>> text="YES">>
>>    @@color:red;( to be discarded )@@
>> </$reveal>
>>
>> That should do it.  Let me know how it goes.
>>
>> enjoy,
>> -e
>> Eric Shulman
>> TiddlyTools / ELS Design Studios
>> InsideTiddlyWiki: The Missing Manuals
>>
>>

-- 
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/223a188b-9436-454d-9534-d5a6dd7934ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to