MATLAB: Popup value in Simulink Mask doesn’t refresh

MATLABsimulink

I am currently masking a block in simulink. The mask contains a popup list called dbclist with hardcoded type options (1, 2, 3, …, 7). The callback function of said popup list looks like this:
msk = Simulink.Mask.get(gcb);
dbcPopup = msk.getParameter('dbclist');
dbcPopup.Value
When changing the value of dbclist while using the mask the command window always responds with:
ans =
1
ans =
1
ans =
1
How can I get the actual value of dbclist? I am using MATLAB 2014b on Mac OS X.

Best Answer

I have found a solution. I am getting the correct value by using
vals = get_param(gcb,'MaskValues');
dbcValue = vals{1}
instead of
msk = Simulink.Mask.get(gcb);
dbcPopup = msk.getParameter('dbclist');
dbcPopup.Value
I still don't know what is wrong with the first approach, especially because it works for Abdus. I would really appreciate iff someone figures out what is wrong.