an issue pop(s)up

81 views
Skip to first unread message

Stephan Hradek

unread,
Jul 10, 2019, 3:35:14 AM7/10/19
to TiddlyWiki
I'm wondering: what am I doing wrong?

Paste this into a new tiddler:

<$button popup="$:/SamplePopupState!!editmode">Pop me up!</$button>

<$reveal type="popup" stateTitle="$:/SamplePopupState" stateField="editmode">
<div class="tc-drop-down tc-popup-keep">

! This is the popup
And this is some text

</div>
</$reveal>

and you'll get

Internal JavaScript Error

Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser
 
TypeError: undefined is not an object (evaluating 'this.wiki.getTiddler(this.stateTitle).getFieldString')

 
 I simply wanted the popup to have its state stored in a field of an existing tiddler.

In the popup I want to enter some data.



PMario

unread,
Jul 10, 2019, 4:25:56 AM7/10/19
to TiddlyWiki
Hi,

On Wednesday, July 10, 2019 at 9:35:14 AM UTC+2, Stephan Hradek wrote:
...
 I simply wanted the popup to have its state stored in a field of an existing tiddler.

As you found out. It's not possible to define a field. It has to be a tiddler.

-m
 

Jeremy Ruston

unread,
Jul 10, 2019, 4:32:18 AM7/10/19
to TiddlyWiki
Hi Stephan

Welcome back!

I'm afraid that's a bug in v5.1.19 that's been fixed in the prerelease (see https://github.com/Jermolene/TiddlyWiki5/pull/3848). You can work around it by using a text reference for the reveal widget instead of separate title and field attributes.

Best wishes

Jeremy

Stephan Hradek

unread,
Jul 10, 2019, 2:57:26 PM7/10/19
to TiddlyWiki


Am Mittwoch, 10. Juli 2019 10:32:18 UTC+2 schrieb Jeremy Ruston:
You can work around it by using a text reference for the reveal widget instead of separate title and field attributes.

Not quite, as the popup does not go away when clicking outside.

BurningTreeC

unread,
Jul 11, 2019, 1:10:11 AM7/11/19
to TiddlyWiki
Hi Stephan,

the problem is that the buttons in tiddlywiki allow setting a popup in a field, but the popup mechanism expects the popup-coordinates being stored in a tiddler's text field

in your case the popup mechanism tries to delete the tiddler "$:/SamplePopupState!!editmode"

that's an edge-case which is not handled correctly ...

for you that means that you should avoid using the state reference (!!) for the popup

Jeremy Ruston

unread,
Jul 11, 2019, 12:08:50 PM7/11/19
to tiddl...@googlegroups.com
This should now be fixed in the prerelease, thanks to BurningTreeC’s PR.

--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
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/ef8ea975-8366-4700-8009-625a9f02a26c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages