I'm using Eric's ListBoxPlugin in my story writing TiddlyWiki.
It being used in a number of places, and I've found an odd and
inconsistent behaviour.
The context is in the tiddlers that are the scenes within each chapter.
Each scene is set in one location, belongs to one thread of the of the
story, occurs at one time, and involves zero or more characters.
I'm sure you can relate that to your own experience reading novels and
short stories. Yes, some have just one location or just one thread or
just one scene, but this is meant to be a general tool.
I'm storing the location, thread, time and list of characters as fields.
Yes, they need to be editable, so there is a customer EditTemplate and a
custom ViewTemplate. The latter is pretty straight forward. (Or will
be once I figure out how to do the display of a time stored as a field
and what format it needs to be stored in.)(But that's another matter.)
Its the EditTemplate that's giving me problems.
The single value of Location and the single value of the Thread are not
a problem. The <<select>> macro in the EditTemplate works fine.
<b>Location:</b> <span macro='select location rows:1 =Locations'></span>
...
<b>Thread:</b> <span macro='select thread rows:1 =Threads'></span>
Reach Location has a tiddler tagged with "Locations" which describes the
location. Similarly with "Threads". There are corresponding entries in
the custom Viewtemplate.
It's dealing with multiples that present the inconsistency.
If in the tiddler for a scene I have
<<select characters rows:3 allowBlank allowMultiple =malecharacter >>
Then it behaves *EXACTLY* as documented.
It behaves even when I use
..... =malecharacter =femalecharacter >>
which is cool :-)
In particular, the names of the characters selected are put in the field
as 'links':
[[Billie Jacks]] [[John Smithers]]
But when I use the macro in the EditTemplate, thus
<span macro='
select characters rows:3 allowBlank allowMultiple =malecharacter
'></span>
(It is all on one line in the template, I've broken it here for
readability.)
then it behaves differently.
The most annoying this is that the selection does *NOT appear in the
field as a link. If the selection has a space in it then only the
'first name' part appears. And if a number of items are selected only
the first name part of the first item appears.
Actually there are a few other irregularities.
* a blank 'prompt' for blank which appears at the top of the list
I know it is a prompt because the mouseover appears:
set charaacters@scene=[No value]
It is a blank prompt because no text appears in that slot
Blank? Yes a blank field, but it seems unhelptful.
* a blank appears at the bottom of the list. The mouseover says
select a value for charters@scene
Surely *THAT* should be visible in the slot and at the TOP of
the list an non-selectable.
Now the version as the macro in the body has the blank prompt for blank,
but there isn't the 'label' since I hav'e sepcified it.
!In summary:
The 'blank' for 'blank' is disconcerting but I can't call it a bug.
The macro behaves differently when used in a EditTemplate, not
fulfilling all of the specification, in particular not inserting links
for items that have space or are not WikiWords.
I've experimented back and forth and can't get the use of the macro in
the EditTemplate to behave like the version in the tiddler.
--
I clicked my heels together three times and wished I was in Cuba, but
the reality fairy smacked me in the head and flew away laughing!
--
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.