[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Opinion on config dialog for QML plasmoids
From:       Viranch Mehta <viranch.mehta () gmail ! com>
Date:       2011-08-18 12:41:51
Message-ID: CADk4Opb=2vC_oGmMz-_J=4m7pCmCu2fagHZt6z7N8fFnpxWe7Q () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Thu, Aug 18, 2011 at 5:13 PM, Viranch Mehta <viranch.mehta@gmail.com>wrote:

>
> Component.onCompleted: {
>     var profiles = dataSource.data["PowerDevil"]["Available profiles"];
>     // do stuff with the map, eg iterate
> }
>
>
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.

Viranch

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_quote">On Thu, Aug 18, 2011 at 5:13 PM, Viranch \
Mehta <span dir="ltr">&lt;<a \
href="mailto:viranch.mehta@gmail.com">viranch.mehta@gmail.com</a>&gt;</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[&quot;PowerDevil&quot;][&quot;Available profiles&quot;];</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&#39;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>



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic