For your perusal: from one convoluted mind to another?

72 views
Skip to first unread message

Charlie Veniot

unread,
Mar 6, 2021, 7:06:08 PM3/6/21
to TiddlyWiki
Just in case this kind of programming code interests you.

Please find attached the related code as a PDF, highlighting the important bits.  If you want to dig into the code itself, find the related Tiddler in my Tifoist project.

I've the following search criteria for retrieving tiddlers (tagged as "fact" tiddlers.)
Screenshot 2021-03-06 at 3.41.26 PM.png

There are, at the moment, seven kinds of errors checked by the filtering process.

"Ignore Errors" will give all fact tiddlers.

"Non-Errors Only" will give all fact tiddlers that have none of the seven kinds of errors.

"Errors Only" will give all fact tiddlers that have one or more of the kinds of errors checked.

Although I'm sure I'll be refactoring my code at some point, I've had an awful lot of fun putting together what I have now.

A little bit of the code pasted below to entice you to delve into the details???

Cheers !

<fieldset>
<legend> Error Status</legend>
<$radio tiddler=<<DataTid>> index="qbe_fact_status" value="Fact"> Ignore Errors </$radio><br>
<$radio tiddler=<<DataTid>> index="qbe_fact_status" value="FactOk"> Non-Errors Only </$radio><br>
<$radio tiddler=<<DataTid>> index="qbe_fact_status" value="FactErr"> Errors Only </$radio>
</fieldset>

<!--🟠Qbe: Error Status-->
<$vars nSmarts=7 vSmarts={{{ [<currentTiddler>get[description]then[FactOk]else[FactErr]regexp<qbeErrStatus>then[a]] [<currentTiddler>get[c1]then[FactOk]else[FactErr]regexp<qbeErrStatus>then[b]] [<currentTiddler>get[c1]get[pk]then[FactOk]else[FactErr]regexp<qbeErrStatus>then[c]] [<currentTiddler>get[c2]then[FactOk]else[FactErr]regexp<qbeErrStatus>then[d]] [<currentTiddler>get[c3]then[FactOk]else[FactErr]regexp<qbeErrStatus>then[e]][<currentTiddler>get[c3]get<vC3CheckField1>then[FactOk]else[FactErr]regexp<qbeErrStatus>then[f]][<currentTiddler>get[c3]get<vC3CheckField2>then[FactOk]else[FactErr]regexp<qbeErrStatus>then[g]] +[count[]]}}}>

<$list filter="[<qbeErrStatus>match[Fact]then<vFact>] [<qbeErrStatus>match[FactOk]then<vSmarts>match<nSmarts>then<vFact>] [<qbeErrStatus>match[FactErr]then<vSmarts>!match[0]then<vFact>]">
TifoistFactsExplorerCode.pdf

clutterstack

unread,
Mar 6, 2021, 11:11:12 PM3/6/21
to TiddlyWiki
Hi CJ,

It's interesting just to see a snippet of a large project, isolated just to share a pattern.

Something about it feels kind of like time travel.

Charlie Veniot

unread,
Mar 6, 2021, 11:40:38 PM3/6/21
to TiddlyWiki
Time travel.  For whatever reason, that made me think of the following tune to psych me up for my eventual study-for-refactoring-opportunities:  https://www.youtube.com/watch?v=HPE9a_epmWw

Mohammad Rahmani

unread,
Mar 6, 2021, 11:57:34 PM3/6/21
to tiddl...@googlegroups.com
Hi Charlie,
 Thank you for sharing your code pattern! These are always useful!
 The fieldset combination is also a powerful tool for making UI

Best wishes
Mohammad


--
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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/fdc638bb-f489-49bf-86aa-5f4de2937b2bn%40googlegroups.com.

clutterstack

unread,
Mar 7, 2021, 9:12:45 AM3/7/21
to TiddlyWiki
Time travel.  For whatever reason, that made me think of the following tune to psych me up for my eventual study-for-refactoring-opportunities:  https://www.youtube.com/watch?v=HPE9a_epmWw

Free association.

Now there's a tune that probably evokes memories of summers of youth for people born in quite a wide time bracket. In North America, anyway. The film itself dates itself pretty specifically!
Reply all
Reply to author
Forward
0 new messages