\d scores home: 0 homeinc:"home+:1" homeinc..c:`button guest:0 guestinc:"guest+:1" guestinc..c:`button / go up and set arrangement \d ^ scores..c: `form / all the scores are a form scores..a: ,`home `guest `homeinc `guestinc / they have a horizontal arrangement scores..a: `home `guest `homeinc `guestinc / they have a vertical arrangement scores..a: (`home `homeinc; `guest `guestinc) / they have a mixed arrangement `show $ `scores / Note that you must have the backquote on scores. / If you do `show $ scores, you won't get that and the arrangement / won't work, but some things will work. / As you increment and decrement, you will get different scores.
\d scores2 home: 0 home..fg: 99 / foreground color should be blue. homeinc:"home+:1" homeinc..bg: 99 / background color should be blue. homeinc..c:`button guest:0 guestinc:"guest+:1" guest..fg: 990000 / foreground should be red guestinc..bg: 990000 / background should be red guestinc..c:`button \d ^ scores2..c: `form / all the scores are a form scores2..a: (`home `homeinc; `guest `guestinc) / they have a mixed arrangement `show $ `scores2 / Note that you must have the backquote on scores.
\d scores3 n: 10 position: 0 position..fg: 9900 / green home: n # 0 home..fg: 99 / foreground color should be blue. homeinc:"home[position]+:1" homeinc..c:`button guest:n # 0 guest..fg: 990000 / foreground should be red guestinc:"guest[position]+:1" guestinc..c:`button \d ~ / attribute directory of the scores3 directory / Note that this is an alternative to \d ^ / followed by scores3..a a:( `home `guest; `homeinc `guestinc; `position) / arrangment \d ^ `show $ `scores3
\d scores4 n: 10 position: 0 position..fg: 9900 / green home: n # 0 home..fg: 99 / foreground color should be blue. homeinc:"home[position]+:1" homeinc..c:`button home..c: `chart guest:n # 0 guest..fg: 990000 / foreground should be red guestinc:"guest[position]+:1" guestinc..c:`button \d ~ / attribute for the scores4 directory a:( `home `guest; `homeinc `guestinc; `position) / arrangment \d ^ `show $ `scores4
\d scores5 balance: 0 wager: 1 home: 0 home..fg: 99 / foreground color should be blue. homeflip:"home:*1 _draw 100" homeflip..c:`button guest:0 guest..fg: 990000 / foreground should be red guestflip:"guest:*1 _draw 100; :[home
\d scores6 balance: 0 wager: 1 home: 0 home..fg: 99 / foreground color should be blue. homeflip:"home:*1 _draw 100" homeflip..c:`button guest:0 guest..fg: 990000 / foreground should be red f:{[wager; home; guest; balance] :[home
\d .k \d bank n: 100 names: `alice `bob `carol `david names,: `eliot `fred `gary `harry `isaac `jack acctnames: names[n _draw #names] balances: n # 0 / fields name: acctnames[0] bal: 0 amount: 0 acctid: 0 deposit:"balances[acctid]+: amount; name: acctnames[acctid]; bal: balances[acctid]" deposit..c:`button withdraw..fg: 990000 / foreground should be red withdraw:"balances[acctid]-: amount; name: acctnames[acctid]; bal: balances[acctid]" withdraw..c:`button acctid..t: "bal: balances[acctid]; name: acctnames[acctid]" / This updates all other fields whenever acctid is updated. bal..t: ":[bal < 0; name..fg: 990000; name..fg:99]" / changes color based on value. \d ~ / attribute for the bank directory a:( `acctid `bal `name; `deposit `withdraw; `amount) / arrangement \d ^ `show $ `bank
S:D:.+(`a`b`c`d; 4 10#,"") / dictionary of blanks S[.;`f]: 19 $ D[] / initialize to 19 blanks per cell S..t: ".[`D;(;);{. y}; S[]]; S[.;`f]: 19 $ D[]" / at all locations in D update based on S. / Then make the format of S be 19 spaces wide and let it take / the data from D. `show$`S
S:D:.+(`a`b`c`d; 4 10#,"") / dictionary of blanks S[.;`f]: 19 $ D[] / initialize to 19 blanks per cell update:{[] oldD: D reachedfixed: 0 while[~ reachedfixed .[`D;(;);{. y}; S[]] / note that this affects the global if[D ~ oldD; reachedfixed: 1] oldD: D ] } S..t: "update[]; S[.;`f]: 19 $ D[]" `show$`S
n: 100 names: ` $' "abc" ,/: $(!n) chk: .+(names; n # 0) chk[~!chk;`c]: `check / check box did not reflect back to the data `show $ `chk / after you do the selections, can get these. selected: & chk[!chk] = 1 selectednames: (!chk)[selected] / Now show that selected gets updated automatically as you process. n: 100 names: ` $' "abc" ,/: $(!n) chk2: .+(names; n # 0) chk2[~!chk2;`c]: `check / check box did not reflect back to the data `show $ `chk2 / after you do the selections, can get these. / chk2..t: " selected: & chk2[!chk2] = 1; selectednames: (!chk2)[selected]; chk2: .+(selectednames; chk2[selectednames]); `show $ `chk2" chk2..t: " selected: & chk2[!chk2] = 1; selectednames: (!chk2)[selected]"