title: Simulink 2011b: Block mask does not updates dynamic fields until closed
body: <p>I have simulation block with a mask containing popup lists.
  This list is filled with options that depends on another parameter. This parameter can be changed from the mask interface.</p>
  
  <p>Let's say that for <code>option A</code>, the popup list contains <code>{Choice1, Choice2}</code>, and for <code>option B</code>, the popup list contains <code>{Choice1, Choice2, Choice3, Choice4}</code>.</p>
  
  <p>When I change <code>option A</code> for <code>option B</code>, the popup list does not update, it still display <code>{Choice1, Choice2}</code>. If the mask is closed then reopened, the popup list displays <code>{Choice1, Choice2, Choice3, Choice4}</code>.</p>
  
  <p>It is not too much an issue in this case, however when moving from <code>option B</code> to <code>option A</code>, the user still have the possibility to select <code>Choice3</code> or <code>Choice4</code>, and when the block is closed and reopen, his actual selection will be <code>Choice1</code>. This poses a threat as the user could select <code>Choice4</code>, close the mask, and run his model.</p>
  
  <p>I can confirm that the mask styles are correctly updated upon option selection and not when the mask is closed, or open. Moreover, the block is also working on Matlab 2014b with the exact same code, and the list is there correctly updated at the correct moment (aka: on option changed).</p>
  
  <p>Any solution for this ?</p>
  
  <p>Edit:</p>
  
  <p>I found this chunk of code, however it did not work as the poster intended (no effect on my side):</p>
  
  <pre><code>wBlockObject = get_param(gcb, 'object');                
  wBlockDialog = DAStudio.Dialog(wBlockObject.getDialogSource);
  wBlockDialog.refresh();
  </code></pre>
  
  <p>It is supposed to force a mask refresh.</p>