Start and end values in widget tree - usage

46 views
Skip to first unread message

BJ

unread,
Oct 25, 2016, 1:23:15 PM10/25/16
to tiddly...@googlegroups.com
When looking at the widget tree via the 'Tools for exploring the internals of TiddlyWiki' plugin, I see 'start' and 'end' nodes and would like to know what they are for. (see attatched image)

cheers

BJ
Screenshot - tiddlywiki.png

Tobias Beer

unread,
Oct 25, 2016, 1:53:07 PM10/25/16
to TiddlyWikiDev
Hi BJ,

Be so kind and fix the link. Thanks.

Best wishes,

Tobias. 

PMario

unread,
Oct 25, 2016, 4:52:16 PM10/25/16
to TiddlyWikiDev

On Tuesday, October 25, 2016 at 7:23:15 PM UTC+2, BJ wrote:
When looking at the widget tree via the 'Tools for exploring the internals of TiddlyWiki' plugin, I see 'start' and 'end' nodes and would like to know what they are for. (see attatched image)

How do you get those start and end nodes. ... Just compiled the latest master - one commit. ... No success.

-m

Jeremy Ruston

unread,
Oct 25, 2016, 5:45:14 PM10/25/16
to tiddly...@googlegroups.com
Hi BJ

The start/end properties are provided in the parse tree by some, but not all, parse tree rules. Thus they can actually be seen in the parse tree preview; see the illustration below.

The reason that the start/end properties are not set by all parse tree rules is an unfinished refactoring of the parser mechanism. Initially, I had used an approach where each parse tree rule did almost all of its work with a single regexp that both matched the parse rule and returned the parameters needed. It ended up not being adequate for the demands of the HTML element/widget, and so I started using a more conventional approach using regexps for speculative matching, and manual parsing for the rest. You can see the approach here:


A by-product of that coding style is the start/end properties in the parse tree. Clearly, there’s a lot of UX things that would require consistent availability of these properties, and I’d be open to revising the remaining parsers to give us that behaviour.

Best wishes

Jeremy



--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/4786ef45-8d0c-462a-a982-172043d90b79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages