Tinderbox Forum

Your suggestions for a dashboard

You can always move much of, or all of, that Rule code to an Agent.

Thanks to all of you who have participated in this thread. Very useful!

1 Like

Holy cow! So much cool stuff in this thread!!!

$Badge does not need to be an image. You can, for example, use a stamp to set $Badge to an Emoji or other character / symbol:

$Badge="🔴";

Thus:

Screenshot%20of%20Tinderbox%20(3-27-19%2C%205-00-45%20PM)

With look-up tables you can simplify the setting of visual completion clues in badge – or even adding attributes containing Emoji or symbols and displayed in Columns.


The playful side of Tinderbox is just grabbing attributes and action code and messing around to see that happens. Mark gave us a massive Erector Set :clap::clap:

2 Likes

Very interesting. I looked for a way to do a Case Statement in Tinderbox and couldn’t find it (other than nested if-then statements I ended up with). This sounds like an even better idea to simplify the Rule code. I’ll look into it soon. Thanks!

More on Look-up tables. The above discussion does suggest that I should add an explicit mention of the feature as a form of case statement equivalent. Added to the aTbRef todo list…

1 Like

Unfortunately, a Lookup Table only takes the form of Paired Values, whereas a Case Statement allows me to set a series of conditionals, like nested if-then statements.

1 Like

The most common use of the case statement, however, is to do precisely what Mark Anderson suggested.

case mill:
$Badge=“milling machine”
break
case fill:
$Badge =“filling machine”
break;

Associative arrays are a nice way to avoid complex conditionals and case statements.

Yep. And I’ll be using arrays this way in TB from now on.

This version shortens the pTask Prototype Rule code, using a new Set Attribute, $ProgressImages, where its Default Value is as follows (all line endings removed for pasting into the Attribute Dialog Default Box):

x0:progress_0000;x1:progress_0001;x2:progress_0125;x3:progress_0250;x4:progress_0500;x5:progress_0625;x6:progress_0750;x7:progress_0875;x8:progress_1000

Using $ProgressImages as a Lookup Table allowed me to eliminate 6 of the previously used nested if-then statements in the pTask Rule.

Thanks to Mark Anderson for helping me with edge case uses of Lookup Tables.

TaskProgress.zip (38.0 KB)

2 Likes

Dominique, this is great, thank you. Does this file incorporate suggestions or is it the original?

Thank you for this observation, Lew. It was an original that I didn’t revise: therefore, if you speak french, you read (in part) in some of my thoughts :wink: which appear in some notes. Is there any way of removing that file? I’ll replace it later without those personal notes.