Hello everyone.

I'm going deeper but slowly ind TW5 programming. 
I want to clear a certain tiddler content and custom fields from within a 
widget.

I read the full code of edit-text, and I think I located where the edition 
occurs.
The function getEditInfo returns an object with the value of the edit and a 
function that updates the tiddler.
Here is the Update Function

update = function(value) {
> var tiddler = self.wiki.getTiddler(self.editTitle),
> updateFields = {
> title: self.editTitle
> };
> updateFields[self.editField] = value;
> self.wiki.addTiddler(new 
> $tw.Tiddler(self.wiki.getCreationFields(),tiddler,updateFields,self.wiki.getModificationFields()));
> }; 


 What does the function Tiddler? I suppose that it creates a new tiddler, 
but I don't understand the syntax.
Is that the only way to update a Tiddler?

If I just want to clear the mentioned values... can I use a simpler way?
Something like
if(clearTiddler)
{
var tiddler=this.wiki.getTiddler(clearTiddler);
tiddler.fields.text="";
}


thanks in advance.

-- 
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 http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to