NTPS-target-task vbox p = props.globals.getNode("/sim/gui/dialogs/NTPS/task", 1); mode = { straight: p.getNode("straight", 1), turns: p.getNode("turns", 1), pitch: p.getNode("pitch", 1), both: p.getNode("both", 1), }; set_radio = func(m) { foreach (k; keys(mode)) { mode[k].setBoolValue(m == k); } } initialized = 0; foreach (k; keys(mode)) { if (mode[k].getType() == "NONE") { mode[k].setBoolValue(0); } initialized += mode[k].getBoolValue(); } if (!initialized) { set_radio("straight"); } # just kept for educational purposes :-) hbox 8 table 00 /sim/gui/dialogs/NTPS/task/straight true nasal left 01 10 /sim/gui/dialogs/NTPS/task/turns true nasal left 11 20 /sim/gui/dialogs/NTPS/task/pitch true nasal left 21 30 /sim/gui/dialogs/NTPS/task/both true nasal left 31