QuickNote, while saving the tiddler to the local TiddlyWiki store (via
saveTiddler), does not trigger persistent storage (via saveChanges).
Whether that's intentional or an omission, I can't tell. Normally
plugins creating or modifying tiddlers should trigger autoSaveChanges
right after saveTiddler, but there are some cases where that might be
undesirable (e.g. when multiple tiddlers are modified in short order).
As a temporary workaround, you could manually trigger saveChanges via
the <<saveChanges>> macro.
-- F.
So, turns out it's not just saveChanges - those plugins also don't
handle custom fields as expected, specifying an empty object rather than
using config.defaultCustomFields. You might wanna alert Eric, see
whether he has any objections to changing that behavior.
> I've noticed that sometimes, when I've been using a checkBoxToggleTag
> - or changed a custom fieldvalue in a tiddler, that tiddler isn't
> saved untill I have made a "normal" change to a tiddler - then the
> saving of the first edit is triggered.
Yes, that's the saveChanges issue...
> Btw I had quite a hazzle trying to remove a published version of my
> zzConfig tiddler.. None of the options (from the dropdown to the left
> "tiddlerOrigin"?) to change or remove it worked.
I don't quite follow what happened there - if you can reproduce it,
could you report this in a new thread?
-- F.
You'd just replace "{}" with "config.defaultCustomFields" - however, I'm
not sure it's such a good idea to fork Eric's plugin, better give him a
chance to update it (this is not TiddlySpace- or TiddlyWeb-specific, but
rather a generic issue).
-- F.
At the end of the script, just add "autoSaveChanges();"
-- F.
You want to merge the fields then:
fields = jQuery.extend({}, config.defaultCustomFields, fields);
store.saveTiddler(...);
-- F.
That plugin has some logic embedded there:
t?t.fields:{}
That's a ternary operation, a shortcut for "if t then t.fields else {}".
Best to untangle this, determining fields above the saveTiddler call:
var t = store.getTiddler(title + "-" + suffix);
var fields = t ? t.fields : {};
fields = jQuery.extend({}, config.defaultCustomFields, fields);
store.saveTiddler( ... , fields);
> I really appreciate your minimalistic snippetstyle answers, I get the
> feeling that I learn new stuff from putting snippets into context and
> at the same time i get a peek into some really basic things which I
> know less than nothing about (syntactically speaking)from each
> reply! Thank you very much for socratic and patient guidance!!
It's quite encouraging to watch you continuously acquire new skills!
-- F.