I am trying to add a switch in app designer using this code:
function SwitchValueChanged(app, event)
value = app.Switch.Value;
if (value == 'Off')
app.SaveOIButton.Enable = 'Off';
app.OpenOIButton.Enable = 'Off';
end
if (value == 'On')
app.SaveOIButton.Enable = 'On';
app.OpenOIButton.Enable = 'On';
end
end
but I get this error:
Arrays have incompatible sizes for this operation.
Error in Mie/SwitchValueChanged (line 82)
if (value == 'Off')
Related documentation
Error while evaluating Switch PrivateValueChangedFcn.
Any idea why?