Re: Still cannot access QMap in QML

2011-06-09 Thread Viranch Mehta
Here's the plasmoidviewer's output: http://paste.kde.org/80143/ (the pmSource in the output=dataEngine) Though it says dataEngine.data["AC Adapter"], dataEngine.data["Battery0"], dataEngine.data["PowerDevil"] are [undefined], I'm able to access the data associated with

Re: Still cannot access QMap in QML

2011-06-09 Thread Viranch Mehta
On Thu, Jun 9, 2011 at 3:40 PM, Aaron J. Seigo wrote: > On Wednesday, June 8, 2011 23:20:02 Viranch Mehta wrote: > > print(dataEngine.data["PowerDevil"]["Available profiles"]); > > wait .. what is "dataEngine"? is it the actual dataEngine? or? it's > entirely > impossible to tell what this code i

Re: Still cannot access QMap in QML

2011-06-09 Thread Aaron J. Seigo
On Wednesday, June 8, 2011 23:20:02 Viranch Mehta wrote: > print(dataEngine.data["PowerDevil"]["Available profiles"]); wait .. what is "dataEngine"? is it the actual dataEngine? or? it's entirely impossible to tell what this code is actually doing without a bit more context. if dataEngine is r

Re: Still cannot access QMap in QML

2011-06-09 Thread Viranch Mehta
On Thu, Jun 9, 2011 at 2:58 PM, Aaron J. Seigo wrote: > On Wednesday, June 8, 2011 23:20:02 Viranch Mehta wrote: > > I am still unable to access QMap returned by dataengine > in > > and you are using kde-runtime from master? > > Yes, I pulled and compiled it after you fixed this. Viranch ___

Re: Still cannot access QMap in QML

2011-06-09 Thread Aaron J. Seigo
On Wednesday, June 8, 2011 23:20:02 Viranch Mehta wrote: > I am still unable to access QMap returned by dataengine in and you are using kde-runtime from master? -- Aaron J. Seigo humru othro a kohnu se GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 KDE core developer sponso

Still cannot access QMap in QML

2011-06-08 Thread Viranch Mehta
Hi, I am still unable to access QMap returned by dataengine in QML. The piece of JS goes like: print("hello"); print(dataEngine.data["PowerDevil"]["Available profiles"]); print("world"); And it prints only "hello", nothing else. I went through the code of JS bindings in runtime, tried playing ar

Re: QMap in QML

2011-06-05 Thread Viranch Mehta
On Sat, Jun 4, 2011 at 7:54 PM, Aaron J. Seigo wrote: > > this is a problem in the JS bindings. i've "fixed" it in master, which will > become 4.7.0 ... i woul dlike to find a better fix, however.. > > Is it only "StringStringMap" specific? Because, we'll be seeing new dataengines coming up and p

Re: QMap in QML

2011-06-04 Thread Aaron J. Seigo
On Saturday, June 4, 2011 15:13:35 Viranch Mehta wrote: > Actually, I'm not sure if its a QMap-in-QML problem, or the [undefined] > object problem. But the thing is the execution never enters the for loop. > > Also, the QMap is typedef-ed to StringStringMap in the > engine, if

Re: QMap in QML

2011-06-04 Thread Viranch Mehta
Actually, I'm not sure if its a QMap-in-QML problem, or the [undefined] object problem. But the thing is the execution never enters the for loop. Also, the QMap is typedef-ed to StringStringMap in the engine, if that matters. ___ Plasma-devel ma

Re: QMap in QML

2011-06-04 Thread Viranch Mehta
On Sat, Jun 4, 2011 at 1:19 PM, Marco Martin wrote: > > try to do > for (item in map) { > print(item) > print(map[item]) > } > > > Well actually, i'm getting the data ( dataSource.data["PowerDevil"]["Available profiles"] ) inside Component.onCompleted and then running the for loop on it.

Re: QMap in QML

2011-06-04 Thread Marco Martin
On Friday 03 June 2011, Viranch Mehta wrote: > Hi, > > I have a combobox to which I need to add the items. The dataengine gives me > a QMap, from which I want to add the keys to the combobox. > I'm not sure how well QML recognizes a QMap and lets me use QMap::keys() > method. try to do for (item

QMap in QML

2011-06-03 Thread Viranch Mehta
Hi, I have a combobox to which I need to add the items. The dataengine gives me a QMap, from which I want to add the keys to the combobox. I'm not sure how well QML recognizes a QMap and lets me use QMap::keys() method. Cheers, Viranch ___ Plasma-devel