From dabca139603f1dc0f3ed61e6f8d225bb5532bd02 Mon Sep 17 00:00:00 2001 From: Omar Rizwan Date: Tue, 18 Oct 2022 18:57:43 -0400 Subject: Flip matching --- virtual-programs/highlight.folk | 4 ++-- virtual-programs/label.folk | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'virtual-programs') 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] -- cgit v1.2.3