onchange (simple)

Help Contents Examples onchange (simple)
onaftermake (debugging) Pascal-Assignment (simple)

onchange (simple)



This simple example shows how to use onchange for powerful smart object updating, similar like smart pointers can act in C++.

Imagine a maths spreadsheet where you can change a value, and onchange will change all the depending values for you !-)

make "a 5
make "b 25

make "a.onchange [make "b :a*:a]
make "b.onchange [make "a sqrt :a]

make "a 10
print :a :b

make "b 10
print :a :b

onaftermake (debugging) Pascal-Assignment (simple)