Masks: Setting "MaskValues" parameter failling on matlab 2014b

2 views (last 30 days)
Hi,
I am currently working with a bunch of code using matlab programatically controlled masks.
I just ran into a new problem, which I did not experience before.
I have to change a checkbox state in the mask, I am basically doing the following:
maskNames = get_param(gcb, 'MaskNames'); maskValues = get_param(gcb, 'MaskValues');
// search in maskNames for the checkbox // change the corresponding index in maskValues (from "on" to "off" in this case)
set_param(gcb, 'MaskValues', maskValues);
For some reason, this is not working under matlab 2014b. The checkbox remains checked, and if I perform a "get_param('MaskValues')" I can see the value is still to "on".
This works on Matlab2011b (same code, no version branches).
However, if I do a simple : set_param(gcb, 'ParameterName', 'off'), then it works. However I cannot really do this as there could be multiple checkbox to change at once and we are using the MaskNames cell search in order to determine which mask component should be modified.
What I do not get, is that I already work on masked blocks and we are using the exact same framework to communicate with them. So basically on other blocks on which I am setting popups, it is working on matlab 2014b.
So I'd like to have an insight of what could cause this problem and how to solve it, because basically I am in a situation where I cannot guarantee that the other chunks of code and other existing blocks using this technique will continue to work or are not even already broken.
On a side note, it is really difficult to work with masks, sometimes it works on matlab 2014b and not 2011b, sometimes it's the opposite with the exact same code. Sometime the mask updates immediately on one version and not the other, then for another block it's the opposite. Sometimes you set a value and you don't get it updated at the next code iteration ...
Dynamic mask behavior is totally un-deterministic and I consider this a big failure from mathworks. I'm advocating for us to definitely drop masks and build external interfaces instead.

Answers (0)

Categories

Find more on Author Block Masks in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!