3.11. make_instr_persistent()
make_instr_persistent()
Retain the value of a variable only with the instrument
Remarks
make_instr_persistent()
is similar to
make_persistent()
, however the value of a varia-
ble is only saved with the instrument, not with snapshots. It can be used to prevent UI elements
from being changed when loading snapshots.
Examples
on init
set_snapshot_type(1) {init callback not executed upon snapshot loading}
declare ui_knob $knob_1 (0,2,1)
set_text($knob_1,"Pers.")
make_persistent($knob_1)
declare ui_knob $knob_2 (0,2,1)
set_text($knob_2,"Inst Pers.")
make_instr_persistent ($knob_2)
declare ui_knob $knob_3 (0,2,1)
set_text($knob_3,"Not Pers.")
end on
The second knob will not be changed when loading snapshots
See Also
read_persistent_var()
make_persistent()
set_snapshot_type()
Do'stlaringiz bilan baham: |