> *addTiddler* appears to also update existing tiddlers, and only those 
fields handed down in the fields object. When a field is explicitly 
declared as *undefined* or *null*, it is deleted.

*addTiddler* either just accepts its parameter as a tiddler, or it 
constructs a new tiddler using its parameter as a definition of the fields.

The tiddler constructor accepts *multiple* parameters, and therefore it has 
to handle the possibility of a particular field being defined by more than 
one of the parameters. A value found in a later parameter will override a 
value found in an earlier one. The special case is that overriding with a 
value of *undefined* or *null* will actually delete the field altogether.

So you're right that the tiddler constructor can delete fields, but it's 
deleting them from the tiddler that's under construction. And that's fine, 
because the fields of that tiddler don't get frozen until the *end* of the 
constructor.

– æ

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

Reply via email to