On Friday, September 11, 2020 at 1:00:52 PM UTC+2, TonyM wrote:
>
> First I made a mistake and tried to use
> \import 
>

> Is there a reason we cant use the same mechanisium?
>

Yes, there is a reason. \import creates variable widgets for the 
widget-tree, that are available for rendering

\importcustom creates internal javascript variables, that are used for 
parsing, for the actual parser instance. 
 

> Regardless I did use
> \importcustom {{mytablecode}}
> and it works well, it also helps limit the applicability while allowing 
> re-usability.
>

importcustom allows to use a filter: so [tag[pragma-config]] will be 
possible. yours should be [[mytablecode]] .. not a transclusion. .. 

I don't know why a transclusion does work. I'll have to have a look what's 
going on. ... but it's OK that it works :)
 

> In the same vein would it be possible to tag such a tiddler 
> with $:/tags/Macro or similar to make them global?
>

I knew, that this question would come up. But at the moment I don't have a 
clue, how to make parser-variables global. ... If you write something like 
this: 

<$button> some text here </$button> ... The button widget instantiates a 
new Parser for "some text here". This is a completely independent memory, 
that doesn't know anything from the pragma rules at the top of the tiddler 
:( ... We are at parsing stage ... _not_ rendering!!

And it has to work that way, otherwise <$transclusion/> couldn't be done, 
because it would bleed side effects into the existing parser instance. 
 

>
>    - No need to protect the user from redefinition's etc.. style-sheets 
>    and existing macros already permit this, it is even safe to call it a 
>    feature!
>    - Perhaps we need to make clear what in a customise pragma will result 
>    in redefinition occurring if customised a second time.
>       - Eg the tick=name 
>    
> That's the point. It is not even global to 1 tiddler, because *every 
widget call *will *create *a *new parser*, that is completely independent. 

Widgets do parse their content at rendering time. ... That makes it 
possible to be dynamic and change attributs. ... 

pragmas are like "stamps". Once you defined them, you can use them in the 
exact same way. You can only change them, if you create a different one. 

 

> In the previous reply on widgets
>
>> I wonder if we could toggle this "Undefined widget " message off, when 
>> not debugging, on by default.
>>
> I understand it is a core feature, I just ask if it may be of value to 
> raise an issue?, does it's opening to arbitrary widget names, introduce the 
> ability for "custom markup" to customise, the widget name used, in effect 
> to disable that widget.
>

I'm OK with the "undefined" message, since a user immediately sees, that 
there is a problem. If we would say nothing and display nothing, those 
problems can be hidden for a long time and will cause hard to find 
problems. 
 
-mario

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" 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/tiddlywikidev/8118724c-ae37-44f1-baa7-70ae6944a066o%40googlegroups.com.

Reply via email to