I am having some trouble understanding how to update the text and other
fields of a tiddler my  widget editor works on.

I am at the point where the editor is holding
(1) editor.widget, a ref to the widget it was called from and
(2) fieldUpdates,  an object with field/value pairs  for all the tiddler's
fields I want to update. My problem is which function to use to get the
task done.

I tried/looked up the following approaches in my update function (located
in a loop in the external library that builds the editor object-)

a. editor.widget.parseTreeNode[field]=fieldsUpdates[field]
    Result: "Compiles" but no results, tiddler text and fields do not
change.

b. editor.widget.wiki.setText(title, field, null, fieldUpdates[field])
    Didn't get to try it because it calls for the tiddler's title, And I
haven't find a method to get it from the widget

c. editor.widget.wiki.setData(fieldUpdates)
   Didn't try it it either, because the code comments say it would change
the tiddler's type to app/json, which is definitely not desired.

What am I missing?

Cheers,

Stefano


-- 
__________________________________________________
Stefano Franchi

[email protected] <[email protected]>
http://stefano.cleinias.org

-- 
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/CAJODLwayReu2EiCgneyHkGe73Xm8cGWdWqCgoSs_N91XVS9OQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to