[tw5] Re: Undefined widget 'let'

2022-12-05 Thread Eric Shulman
The `$let` widget was added to the TWCore in v5.2.1 (8 December 2021).  The 
error you are seeing indicates that you are using a version of TW that is 
older than v5.2.1.

To fix this, you need to upgrade your TiddlyWiki.  Go to 
https://tiddlywiki.com/upgrade.

-e



On Monday, December 5, 2022 at 1:19:50 PM UTC-8 ethanc...@gmail.com wrote:

> I recently tried to install the Search Package Plugins from TiddlyTools: 
> https://tiddlytools.com/# but am now getting this message: "Undefined 
> widget 'let' Undefined widget 'let'Undefined widget 'let'" in the upper 
> left-hand corner of my wiki. 
>
> Has anyone else had this issue? Or does anyone have thoughts and a 
> possible fix? I made the grave mistake of not making a copy of my HTML file 
> before adding a new plugin, and I am now regretting it. 
>
> Cheers,
> Ethan
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/61d84b56-864e-4c4e-ac60-a89e2af1ca51n%40googlegroups.com.


[tw5] Undefined widget 'let'

2022-12-05 Thread Ethan Parrish
I recently tried to install the Search Package Plugins from TiddlyTools: 
https://tiddlytools.com/# but am now getting this message: "Undefined 
widget 'let' Undefined widget 'let'Undefined widget 'let'" in the upper 
left-hand corner of my wiki. 

Has anyone else had this issue? Or does anyone have thoughts and a possible 
fix? I made the grave mistake of not making a copy of my HTML file before 
adding a new plugin, and I am now regretting it. 

Cheers,
Ethan

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f3002163-e98e-46ec-adaa-06b38e853a28n%40googlegroups.com.


[tw5] Re: why my macro return is not rendered correctly ?

2022-12-05 Thread Eric Shulman
There's no need to use javascript for this macro.  Instead, you can create 
a tiddler named "$:/plugins/vpl/jazzbokMem/db_macros_plan", tagged with 
`$:/tags/Macro`, containing:
```
\define db_macros_plan(opt)
<$let audio_path={{$opt$!!audio_ref}}>
<$list filter="[search:title[file/audio/cours]]" 
emptyMessage="N/A">
   > preload="auto" controls>

\end
```
You can then use it exactly as you were before:
```
<$macrocall $name="db_macros_plan" opt={{{ [get[title]] }}} 
/>
```
enjoy,
-e
On Sunday, December 4, 2022 at 11:41:38 PM UTC-8 vpl wrote:

> Of course,
> here it is:
>
> /*\
> title: $:/plugins/vpl/jazzbokMem/db_macros_plan.js
> type: application/javascript
> module-type: macro
>
>
> \*/
> (function(){
>
> /*jslint node: true, browser: true */
> /*global $tw: false */
> "use strict";
>
>
> /*
> Information about this macro
>
> */
> exports.name = "db_macros_plan";
>
> exports.params = [
> {name: "opt"}
> ];
> /*
> Run the macro
> */
> exports.run = function(opt) {
> var str_return = "N/A";
> console.log("db_macros_plan 0.2. opt:"+opt);
>var dbPlanTiddler = this.wiki.getTiddler(opt);
> var audio_path = dbPlanTiddler.getFieldString("audio_ref");
> if (audio_path.includes("files/audio/cours")) {
> str_return = "audio src=\""+audio_path+"\" preload=\"auto\" 
> controls>";
> console.log(str_return);
> }
> return (str_return);
> };
>
> })();
>
> Le lundi 5 décembre 2022 à 03:15:56 UTC+1, cj.v...@gmail.com a écrit :
>
>> I think we are going to need to see the full definition of your 
>> "db_macros_plan" macro.
>>
>> On Sunday, December 4, 2022 at 10:43:27 AM UTC-4 vpl wrote:
>>
>>> Hi,
>>>
>>> I've the following table that list different scores (tiddlers in 
>>> tiddlywiki). See bottom of this mail
>>>
>>> This works perfectly except for the 
>>> <$macrocall $name="db_macros_plan" opt={{{ [get[title]] 
>>> }}} /> execution.
>>>
>>> This macro return what I expect, that is to say: 
>>> audio src="files/audio/cours/blues-ex-1.mp3" preload="auto" 
>>> controls>
>>> But in the rendered table this appears as a the string 'audio 
>>> src="files/audio/cou " where I expect to get the refering html5 
>>> audio element
>>>
>>> What is my error ..??
>>>
>>> Thanks a lot for your help
>>> Regards
>>>
>>>
>>> 
>>> 
>>> 
>>> ModeAudioCommentsScore
>>> 
>>> <$list filter=<>>
>>> 
>>> <$view field="mode"/>
>>> <$macrocall $name="db_macros_plan" opt={{{ 
>>> [get[title]] }}} />
>>> <$view field="comments"/>
>>> get[score_ref]] }}} />
>>> 
>>> 
>>> \end
>>>
>>>
>>>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c118709a-0911-4c77-8fd4-45d4b2b5652cn%40googlegroups.com.