I'm working on enhancing my *ThirdFlow* plugin with convenience features, 
like creating new tiddlers of certain type from templates inside a plugin. 
As preferences vary, I want to allow developers working with the *ThirdFlow* 
plugin to be able to control how they organize their tiddlers inside their 
plugins. Say, macro tiddlers go to ".../macros/"  inside a plugin ("..." 
refers to the plugin's full title, such as "$:/plugins/FooPub/BarPlugin").

I would like to have an individual path (or rather: infix) setting with its 
default coded only in one place. That is, ideally I would simply use:

<$edit-text tiddler="$:/config/ThirdFlow/macroinfix" default="macros" 
tag="input"/>

However, when opening this settings dialog, if 
$:/config/ThirdFlow/macroinfix isn't present, it won't be created. Okay, it 
wouldn't make sense to create the tiddler, as when a new plugin user 
doesn't open the settings dialog, the config tiddlers would never get 
created.

So, what would be a good coding pattern in TW5 to ensure consistency 
between config tiddlers, default settings, the settings UI, and the use of 
the config tiddlers? The default= parameter of the edit-text widget only 
applies to the UI. How can I later refer to the potentially non-existing 
config tiddler and pick up a default value if the config tiddler yet 
doesn't exist?

Best regards,
TheDiveO


-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/10aa825d-3c22-4c2d-9ecb-29a0ca285d50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to