On Thu, Nov 28, 2013 at 10:00 PM, Stephan Hradek
<[email protected]>wrote:
> I think, I slowly get it, but I also think I'll have to do it a bit
> different. Man I wish Macros would work correct ;)
>
You mean you wish you could import macros?
> You see: The answers are always categories from A-F with standard texts if
> no special text is defined. Answer 7 is always "n/a".
>
> So what I want to achieve is, that the questionaire "designer" can simply
> concentrate on the questions and need not worry about the layout or the
> linkage to the answers.
>
I don't think that this desire clashes with my proposal above.
> So my idea at the moment is, to do most parts with a macro:
>
> Title: Q-001 Do you like my questions?
> Text:
> -----------------------------------
> <<Classification "Q-001" A:"Optimum" F:"Fail">>
>
> Please take car to answer this
>
> # honestly
> # no kidding allowed
> -----------------------------------
> This should then generate my 7 radio buttons which store their value to
> (in this case) the field "result" of tiddler "Q-001". After the 7 radio
> buttons I'd like to have a reference to "Q-001".
>
> Unfortunately I have no idea how to get the buttons to store to a
> not-yet-existing tiddler. It seems setTextReference does not create the
> tiddler.
>
It's a bug, setTextReference() should create the tiddler if required.
> I also have no idea how to create the tiddler in such a case, based on a
> skeleton so that it has, for example, also some default tags set.
>
Like this:
var skeleton = {title: "HelloThere", text: "Sometext", tags: "one two
[[three four]]"};
var newTiddler = wiki.addTiddler(new $tw.Tiddler(skeleton,{title:
"NewTItle"}))
The $tw.Tiddler constructor flattens the provided tiddler field objects,
with the later fields taking precedence over the earlier.
Best wishes
Jeremy
>
--
Jeremy Ruston
mailto:[email protected]
--
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.