<div dir="ltr"><div class="gmail_quote">On Thu, Aug 18, 2011 at 5:13 PM, Viranch Mehta <span dir="ltr"><<a href="mailto:viranch.mehta@gmail.com">viranch.mehta@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div dir="ltr"><div class="gmail_quote"><div class="im"><br></div><div>Component.onCompleted: {</div><div> var profiles = dataSource.data["PowerDevil"]["Available profiles"];</div><div> // do stuff with the map, eg iterate</div>
<div>}</div><div><br></div></div></div></blockquote><div><br></div><div>Fixed. The above code (for getting the map and iterating) had to be put inside MouseArea.onClicked (which is for showing the popup dialog of battery applet). For some reason, it worked there, but wouldn't work inside any Component.onCompleted. So everytime it is clicked, the map gets populated, clear the combo box first and then add each item in the combo box. This seems kind of a dirty work around, but works for now.</div>
<div></div></div><br><div>Viranch</div></div>