Hi,

i realized a (probably?) bug in the reveal-widget of 5.1.19 when using 
*stateTitle+stateField* (rather than just *state)* in combination with a 
non-persistent/-existing (temporary) *stateTitle*. Here is a problematic 
example:

<$reveal type="match" stateTitle=<<qualify 
"$:/state/rimi/tag-selection/$type$">> stateField="scope" text="local" 
default="local">... </$reveal>

When i used it that way (with the $:/state-namespace) it worked until the 
first reload of the TW (because $:/state doesn't persist over that). The 
next reloads produced an "TypeError: this.wiki.getTiddler(...) is 
undefined"-error when opening that tiddler. The browser-error directly 
pointed to the following code-position in the reveal-widget (regarding 
chrome it is around #122 -- i didn't crosscheck that):

[...]
/*
Read the state tiddler
*/
RevealWidget.prototype.readState = function() {
 // Read the information from the state tiddler
 var state = this.stateTitle ? (this.stateField ? this.wiki.getTiddler(this.
stateTitle).getFieldString(this.stateField) :
[...]

As stated in the last line of the code-snippet above, TW assumes that this.
wiki.getTiddler(this.stateTitle) *must exist* (by being directly 
dereferenced) in case this.stateField is set. This isn't a wanted behaviour 
or do i oversee something?

PS: In my case i switched to the usage of state which is in my case more 
tolerant. So no hurry here from my side.

Thanks in advance,
Mirko

-- 
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/b4cec6a1-8e15-4412-b213-b8517543a8ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to