diff options
| author | Omar Rizwan <omar@omar.website> | 2022-10-18 22:57:43 +0000 |
|---|---|---|
| committer | Omar Rizwan <omar@omar.website> | 2022-10-18 22:57:43 +0000 |
| commit | dabca139603f1dc0f3ed61e6f8d225bb5532bd02 (patch) | |
| tree | 1acc725e9f757db600a4888d5881e34613d7af09 /virtual-programs | |
| parent | Fix trie leak (diff) | |
| download | folk-dabca139603f1dc0f3ed61e6f8d225bb5532bd02.tar.gz folk-dabca139603f1dc0f3ed61e6f8d225bb5532bd02.zip | |
Flip matching
Diffstat (limited to 'virtual-programs')
| -rw-r--r-- | virtual-programs/highlight.folk | 4 | ||||
| -rw-r--r-- | virtual-programs/label.folk | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/virtual-programs/highlight.folk b/virtual-programs/highlight.folk index 81150127..113bdc92 100644 --- a/virtual-programs/highlight.folk +++ b/virtual-programs/highlight.folk @@ -1,5 +1,5 @@ -When /rect/ is a rectangle with x /x/ y /y/ width /width/ height /height/ { - When /someone/ wishes $rect is highlighted /color/ { +When /someone/ wishes /rect/ is highlighted /color/ { + When $rect is a rectangle with x /x/ y /y/ width /width/ height /height/ { # it's not really correct to just stick a side-effect in the # When handler like this. but we did it in Realtalk, and it # was ok, so whatever for now diff --git a/virtual-programs/label.folk b/virtual-programs/label.folk index 84361512..d30296ec 100644 --- a/virtual-programs/label.folk +++ b/virtual-programs/label.folk @@ -1,5 +1,5 @@ -When /rect/ is a rectangle with x /x/ y /y/ width /width/ height /height/ { - When /someone/ wishes $rect is labelled /text/ { +When /someone/ wishes /rect/ is labelled /text/ { + When $rect is a rectangle with x /x/ y /y/ width /width/ height /height/ { set lines [split $text "\n"] set longestLineLength [tcl::mathfunc::max {*}[lmap line $lines {string length $line}]] set fontSize [expr $width / $longestLineLength] |
