Hi Mat, 

Deep dive warning !!
Dev speak follows. 

On Thursday, June 1, 2017 at 2:06:30 AM UTC+2, Mat wrote:
>
> Thanks Andreas!
>
> - Shadow tiddlers exist separately from normal tiddlers and are therefore 
>> effectively marked as "originating from a plugin"
>>
>
> The thing is, I don't find them in the source in any other place than 
> inside the plugin. 
>

Open: http://tiddlywiki.com/#%24%3A%2Fcore and expand the view. .. Select 
the "contents" tab and you will see them all. 
 

> - When you click on a title in a plugins content list, what you see as the 
>> tiddler that pops up, is TW internally redirecting to the separate shadow 
>> tiddler store to determine the contents of the shadow tiddler.
>>
>
> "redirect to the shadow tiddler store" - ...where would this be? Is "the 
> store" not the plugin? Surely, it can't be in memory, right?
>

It is memory, that only can be reached with the $tw.wiki.getTiddler() 
<https://github.com/Jermolene/TiddlyWiki5/blob/master/boot/boot.js#L941> 
function. The redirect means, that there is a special check in the code 
that handles the request. .. see: line 947 in the above link.  
 

> I could imagine that what was presented as a shadow tid was really 
> something like a *transclusion* presenting the JSON fields from the 
> plugin via a template...
>

as seen above ...  it's a separated private memory, that can only be 
reached with an API call. 
 

> but if this was the case then I think we'd have generally more powerful 
> JSON features...
>

JSON means ... JavaScript Object Notation <http://www.json.org/>. 

A JS object is created, when ever you say:   var mytiddlers = {}; 

In the case of shadow tiddlers its similar to mytiddlers[title].tiddler 
which is also called a hashmap <https://en.wikipedia.org/wiki/Hash_table>. 
Hashmaps can be used for fast "database" lookups. So you can see, that JSON 
is "native" in javascript, with some special twists. We have very powerfull 
tools, to deal with JSON. .. They are just not exposed directly to the 
users. ... 

We have "data-tiddlers", which let you deal with basic JSON objects, 
without starting js programming. 
 ... If you need to go deeper, you need to create js-macros, because that's 
the next step. 

hope that helps.
have fun!
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/fbbbfb9f-fbef-4171-862d-11a87f9de307%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to