Create a static scene #1
No files matched your search
@@ -121,6 +121,15 @@ util/rm-mac-geom # reset the app's saved window geometry
|
|||||||
otherwise the build fails on `F.<field>` being unresolved.
|
otherwise the build fails on `F.<field>` being unresolved.
|
||||||
- `dialect.swift` is generated — edits there are overwritten on the next
|
- `dialect.swift` is generated — edits there are overwritten on the next
|
||||||
`util/build-mac`. Change the source (`dialect.yml` / `components/`) instead.
|
`util/build-mac`. Change the source (`dialect.yml` / `components/`) instead.
|
||||||
|
- **Validate `dialect.yml` after edits** (e.g. `ruby -ryaml -e 'YAML.load_file("dialect.yml")'`).
|
||||||
|
Every should-branch label (`1. Upon each ...`) MUST end with a colon — the
|
||||||
|
parser (`components/yml/ymlFun.swift`) blindly `dropLast()`s it, so a missing
|
||||||
|
colon silently eats the label's last character in the generated `about`
|
||||||
|
comment. Note the file can never pass a *strict* YAML parser: condition and
|
||||||
|
reaction lines (under `if:` / `then:`) contain unquoted `: ` (e.g.
|
||||||
|
`c.countText = "Count: '\(c.count)'"`), which standard YAML rejects. So treat
|
||||||
|
a parser complaint pointing *inside* an `if:`/`then:` block as expected; any
|
||||||
|
complaint elsewhere (like a missing branch-label colon) is a real bug.
|
||||||
|
|
||||||
## Swift 6
|
## Swift 6
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -23,12 +23,12 @@ RootComponent:
|
|||||||
then:
|
then:
|
||||||
c.count += 1
|
c.count += 1
|
||||||
countText:
|
countText:
|
||||||
1. Upon each count change
|
1. Upon each count change:
|
||||||
if:
|
if:
|
||||||
c.recentField == F.count
|
c.recentField == F.count
|
||||||
then:
|
then:
|
||||||
c.countText = "Count: '\(c.count)'"
|
c.countText = "Count: '\(c.count)'"
|
||||||
2. Upon launch
|
2. Upon launch:
|
||||||
if:
|
if:
|
||||||
c.recentField == F.didLaunch
|
c.recentField == F.didLaunch
|
||||||
then:
|
then:
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ func rootShouldResetCount(_ c: RootContext) -> RootContext {
|
|||||||
func rootShouldResetCountText(_ c: RootContext) -> RootContext {
|
func rootShouldResetCountText(_ c: RootContext) -> RootContext {
|
||||||
var c = c
|
var c = c
|
||||||
|
|
||||||
/* 1. Upon each count chang */
|
/* 1. Upon each count change */
|
||||||
if
|
if
|
||||||
c.recentField == F.count
|
c.recentField == F.count
|
||||||
{
|
{
|
||||||
@@ -224,7 +224,7 @@ func rootShouldResetCountText(_ c: RootContext) -> RootContext {
|
|||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 2. Upon launc */
|
/* 2. Upon launch */
|
||||||
if
|
if
|
||||||
c.recentField == F.didLaunch
|
c.recentField == F.didLaunch
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user