> I'm using the checkboxplugin from
tiddlytools.com to create a
> checklist for the nightshift at my workplace.
> I'm using this in a CCtiddlywiki instead of a normal tiddlywiki, and
> that means the autosaving feature doesn't work.
> The final checkmark should tag the tiddler "done" and then also "save"
> the tiddler to the server, I know that the macro for uploading the
> store area is <<ssUploadStoreArea>>, I was wondering if I could let
> the checkmark tag the tiddler "done" as well as make it run that
> particular macro when checked?
You can include "side effect" handlers in a checkbox to invoke
javascript code:
[x(done){init handler}{beforeclick handler}{afterclick handler}]
For example, using the core's standard "saveChanges()" function:
[x(done){}{}{if (saveChanges()}]
with this syntax, each time you click the checkbox, after the plugin
sets the checkbox's current state (and the corresponding "done" tag),
saveChanges() is automatically invoked. Note that in this example
there are no "init" or "beforeclick" handlers, so they are entered
using "{}" as placeholders.
IMPORTANT NOTE: To use an "afterclick" custom handler in a checkbox,
you need to install the most recent update (v 2.3.0)
http://www.TiddlyTools.com/#CheckboxPlugin
As to your specific use-case:
For CCTiddly, I don't think you can just invoke saveChanges()... but,
as you noted, there is a macro <<ssUploadStoreArea>> that does the
desired action (i.e.,saving to the server).
IF you can identify an programmatic entry point into that macro that
can be invoked directly from javascript, then you can trigger it from
a checkbox, using the above technique.
HTH,
-e
Eric Shulman
TiddlyTools / ELS Design Studios