On Sunday, September 18, 2016 at 10:47:53 AM UTC+2, Siniy-Kit wrote:
>
> Now I try to teach this macro to save some data from URL to the list field 
> of tiddler $:/temp/mylist
> I try to use this hook 
> http://tiddlywiki.com/dev/#Hook%3A%20th-saving-tiddler but get error.
>
> I use this $tw.Tiddler("$:/temp/mylist",{"list": value}); 
>

The only way to create new tiddlers is $tw.wiki.addTiddler()    

So a typical call may look like this: 

var fields = {list:"a b c", an_other_field:"test"};
var title = "test-title"; 

$tw.wiki.addTiddler(new $tw.Tiddler($tw.wiki.getCreationFields(),fields,{
title: title},$tw.wiki.getModificationFields(), {title:"this-title-wins"}));


If you copy paste the above code into the debug console it will create a 
tiddler named: "this-title-wins" ... Since it is the last parameter in the new 
$tw.Tiddler() call. So parameter priority is from left to right!

have fun!
mario


-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
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/4c5f5943-79e2-49f7-9813-c800fc571f71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to