Questions Tagged With ivyscripthttps://answers.axonivy.com/tags/ivyscript/?type=rss&user=Dirk%20Busmannquestions tagged <span class="tag">ivyscript</span>enThu, 18 Mar 2010 08:48:28 -0400Casting in ivyScripthttps://answers.axonivy.com/questions/341/casting-in-ivyscript<p>I need to call a method on certain componentes within a rich dialog panel. I get all components of the panel and then loop over them like this: </p> <pre><code>List&lt;ULCComponent&gt; listComponent = panel.getComponents(); for(int i = 0; i &lt; listComponent.size(); i++){ if(listComponent.get(i) instanceof RLabel){ RLabel label = (RLabel) listComponent.get(i); ((RLabel) listComponent.get(i)).setVisible(in.showLabel); } } </code></pre> <p>In both lines with the casting I get exceptions:</p> <pre><code>Unexpected token: identifier 'listComponent' </code></pre> <p>What is wrong?</p>Dirk BusmannThu, 18 Mar 2010 08:48:28 -0400https://answers.axonivy.com/questions/341/casting-in-ivyscriptivyscript