/srv/irclogs.ubuntu.com/2014/01/06/#ubuntu-app-devel.txt

=== shuduo|afk is now known as shuduo
=== JamesTait is now known as Guest84209
=== Guest84209 is now known as JamesTait
=== john-mca` is now known as john-mcaleely
kalikiana_nik90: ping11:05
nik90kalikiana_: pong11:53
=== _salem is now known as salem_
kalikiana_nik90: ah there you are12:18
kalikiana_I just replied to the list12:18
kalikiana_maybe have a look at the reply first12:18
nik90kalikiana_: thnx. looking at the email now12:19
nik90kalikiana_: I have seen and used http://developer.ubuntu.com/api/qml/sdk-1.0/U1DB/ before. Infact I did a hangout with stuart during which michael hall added it to the API docs. It was quite useful to list the functions of database, document etc.12:25
nik90kalikiana_: so with regards to index, while specifying the expression is there a specific order we must use?12:26
nik90also does it expect the expressions to be of the same size?12:27
kalikiana_nik90: in general the query needs to list the same expressions defined in the index12:28
kalikiana_if you want to search foobar, it needs to be in the index12:28
nik90okay, so in essence an index provides the data, while queries uses them to filter and pass it on as a model.12:29
kalikiana_yep12:31
kalikiana_which as you've found is limited to wildcards basically right now. but there's plans for more filters ie. transformation functions in u1 lingo12:32
nik90kalikiana_: I looked at the bug report you mentioned in the email and I think providing the capability to add user function to use as filters to provide some freedom to the developer12:33
nik90kalikiana_: and regarding sorting of results, what I meant was in python, I saw calls like sorted(modeldata) where it returns the results in an alphabetical order, or in ascending/descending order. Unfortunately QML doesn't offer this natively.12:35
kalikiana_ah right. in qml you can only do it "by hand" like copying the model and using move() with your own algorithm12:39
kalikiana_hmm do you think this would make sense as a u1db feature?12:40
kalikiana_nik90: maybe indirectly this could be solved through transformation functions12:41
kalikiana_at the bottom of this mock api https://launchpadlibrarian.net/149329873/queryfuncs.qml12:42
kalikiana_that's pretty much a way of sorting12:42
nik90kalikiana_: yeah me and andrew thought that u1db would provide a efficient and more lean sorting function instead of us having to create one.12:44
nik90kalikiana_: I have branch which shows of the sample app I have been working on at https://code.launchpad.net/~nik90/+junk/u1db-sample-app12:45
nik90can you take a look and let me know if I am doing stuff correctly in the listview?12:46
nik90I feel like I am complicating matters by using a repeater inside a listivew12:46
timpnik90: why would you do that instead of using a ListModel?12:48
nik90timp: because strangely enough, when I specified contents.tracks, it threw a undefined output.12:50
nik90timp: Also looking at my document structure, it seems it is a list inside a list. The tracks is a list object inside the playlist document12:50
nik90kalikiana_: I also noticed a bug with example 5 in u1db-qt examples located at http://bazaar.launchpad.net/~uonedb-qt/u1db-qt/trunk/view/head:/examples/u1db-qt-example-5/u1db-qt-example-5.qml.12:51
nik90I ran it without any modifcation and the output is rather bizarre12:52
nik90I expect it to show 7 outputs in the listview, but it only shows 3.12:52
nik90can you confirm that pls?12:52
nik90timp: I am open to suggestions to simplifying that. I feel like I am over complicating it12:53
timpnik90: do you have a link (http?) of your code on launchpad? I can have a quick look12:55
nik90timp: http://bazaar.launchpad.net/~nik90/+junk/u1db-sample-app/view/head:/u1db.qml12:55
timpnik90: thanks12:57
timpnik90: perhaps it is possible to create a ListModel and put the repeater inside that12:57
timpI'm not sure if that is actually better than what you have now12:57
timphmm.. a Repeater in a ListModel may not work, but some functional way of generating the model would be useful here.13:00
timpwait a sec.. what does aQuery return? if it is the list of tracks (and not list of playlists) then you don't need a repeater13:02
nik90timp: I tried using a Multivalue list Item from the SDK which accepts a list. However when I used that I got a output stating TypeError: Cannot read property 'length' of undefined13:02
nik90http://paste.ubuntu.com/6703066/13:03
nik90timp: would you expect two queries, one for playlist list and the other for playlist track info?13:05
nik90Each document stores the playlist name and its associated tracks. As an analogy, think of a task and its tags in a document. I wish to display both the task info like name and its associated tags in the listview13:07
nik90Which is why I have one query which retrieves the playlist name and its tracks13:07
timpI'm not sure what your query returns, but if it has all the tracks (ordered by playlist), you can use that as a model.13:11
timpthen the tracks are the items in the listview, and playlist names the sections13:11
timp(it may be more complicated than what I'm saying, depending on what the queries do exactly. I didn't check that in detail)13:12
nik90timp: oh yeah I totally forget to use section headers. But yeah in essence that's what I want to achieve. Have section headers as playlist names, and results and track info13:17
nik90let me see if I can implement that13:18
kalikiana_nik90: diff to avoid the repeater http://paste.ubuntu.com/6703112/ for testing I used JSON.stringify which is very good for debugging - I think there's either a bug causing name to be missing or I'm overlooking a typo in my changes13:18
kalikiana_but that would be what you intended functionally?13:18
kalikiana_minus the missing name, that is13:18
nik90kalikiana_: yup.13:19
nik90My intention was to specify contents.something and be able to display that easily13:20
nik90without having to resort to repeater in a listview13:20
kalikiana_my guess is you encountered an 'undefined' for a similar reason as I stumbled on, somehow a missing value, which in javascript becomes a catch-all undefined13:20
nik90kalikiana_: I don't thinkn there is a typo causing name to be missing. I have that issue all day yesterday.13:21
nik90the moment I change that to just playlist.tracks in the index expression, things work out13:21
kalikiana_you mean not using name?13:22
kalikiana_I think something might be wrong in Query as it doesn't include name in the result/ contents13:23
nik90I mean when the index expression is ["playlist.name", "playlist.tracks"], the name is displayed. But if I change that to ["playlist.name", "playlist.tracks.file", "playlist.tracks.title"], then name becomes undefined13:24
kalikiana_interesting. if I do that name is there but nothing else13:25
nik90exactly13:26
kalikiana_so somehow they kick each other out. even if I change the order same reltion13:27
kalikiana_*relation13:27
nik90yup..but this only happens with a multiple level list. Since if you have other properties like playlist description in the same level as the playnist name, they are both available13:29
timpnik90: cool. Are you writing a full app, or is it intended to demo the u1 functionality only?13:34
timpthe u1db bindings look very interesting, but I haven't had time yet to check it out.13:34
nik90timp: only demo purposes..but my full intention is to use u1db in clock-app. Hence this is a preparation for it :)13:35
timpnik90: okay. always good to have some demo programs :) Personally I prefer that over long tutorials when learning something new.13:36
timpit teaches you 90% of what you need to know in 10% of the time :)13:37
nik90timp: +1 but only if the demo program has comments. otherwise it becomes rather unclear what  the code does.13:37
nik90timp: in the u1db-qt examples, examply 5 and 6 have no comments making it guesswork to see what they are for.13:38
nik90timp, kalikiana_: I tried using a section header as suggested, however it outputs that contents is not defined. -> http://paste.ubuntu.com/6703235/13:42
kalikiana_actually I've never used section stuff - nik90, on a guess try model.contents.name13:47
kalikiana_but not sure if it is actually a delegate or how it behaves13:47
nik90kalikiana_: it behaves exactly like a delegate. so passing contents.name should work like normal.13:48
kalikiana_nik90: oh, actually could you be hitting the same bug as before with name missing?13:49
nik90kalikiana_: I thought so. But after changing the index expression back to the orignal where contents.name should work but it doesnt with a section header.13:50
nik90but that's fine.13:51
nik90Should I report a bug about the name being undefined issue?13:51
kalikiana_yes please file a bug for the name. if possible mention the weird relation with the tracks, that has to be a hint at the underlying bug13:52
kalikiana_I'm trying the section stuff now13:52
kalikiana_nik90: so… what exactly should the section header use? why is there text: as well as the section.property?13:57
kalikiana_not sure if I'm using it right13:58
nik90kalikiana_: section property defines the text that will be shown in the section header. In our case that would be the playlist name.13:59
kalikiana_but it doesn't work if I put "foo" in there13:59
kalikiana_by which I mean I don't see anything besides the list14:00
nik90http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-listview.html#section.criteria-prop14:01
nik90or better here is an example http://qt-project.org/doc/qt-5.0/qtquick/views-listview-sections-qml.html14:02
=== alex_abreu is now known as alex-abreu
jdstrandso, I wrote a small qml app for myself that uses a column and a few rows that each has a Label and a TextField. it works fine except that in the last TextField, when I click in it, the OSK covers it up. It seems that the app should adjust to slide up over the OSK, but it doesn't automatically. I've tried wrapping it in a Flickable, but it doesn't work.14:05
jdstrandI've seen this in a number of other apps too. what is the correct technique to have the app adjust to when the osk pops up?14:06
nik90jdstrand: http://nik90.com/ubuntu-touch-keyboard-tricks/14:07
timpnik90: section.property: "name" works?14:07
nik90jdstrand: short summary, you need to set anchorToKeyboard: true14:07
nik90timp: no :/14:07
nik90timp: I tried model.contents.name, name, ccontents.name14:08
nik90reallys strange14:08
timpnik90: the example http://qt-project.org/doc/qt-5.0/qtquick/views-listview-sections-qml.html uses a string to define the section.property14:08
jdstrandnik90: cool, thanks!14:09
* jdstrand tries14:09
nik90timp: I think they made a mistake. Since I use the section feature in the clock app -> http://bazaar.launchpad.net/~ubuntu-clock-dev/ubuntu-clock-app/trunk/view/head:/clock/WorldClock.qml14:11
nik90timp: you essentially give it a model property so that you have multiple section headers14:11
nik90timp: actually you are correct! My mistake14:13
nik90in the clock app, I also use a string14:13
kalikiana_nik90: this doesn't show up at all and the delegate isn't even evaluated if I put a console.log in there http://paste.ubuntu.com/6703381/14:17
kalikiana_by the example it should be used like that14:17
nik90kalikiana_: I realise that.. no worries, I will try to figure this out later14:20
kalikiana_okay14:22
timpkalikiana_: can you see what's wrong here? https://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-trusty-amd64-ci/458/console14:24
timppoor jp getting all the failure logs ;p14:24
kalikiana_timp: components::DatePickerAPI::test_1_changeDateToNextMonth() Uncaught exception: Cannot read property 'children' of null14:24
kalikiana_   Loc: [(0)]14:24
timpah yes I see now.14:25
timpsearching for "fail!" is a lot handier than going through all the "fail" instances in the file14:25
mhall119jdstrand: did you get the help you needed?14:25
timpkalikiana_: weird. I got that from the headerInit MR... nothing to do with DatePicker.14:25
jdstrandmhall119: yes, thanks :)14:26
nik90kalikiana_: https://bugs.launchpad.net/u1db-qt/+bug/126647814:29
ubot2Launchpad bug 1266478 in U1DB Qt/ QML "Query model doesn't work properly with a multilevel document list" [Undecided,New]14:29
nik90kalikiana_: can we expect bug fixes for u1db-qt since it seems like all contributors have moved to ui-toolkit?14:30
kalikiana_nik90: I am trying to make some time. I think it will be worth a lot to have you actively giving feedback, in the past I sometimes had to "hunt down" people who had problems but didn't report14:33
nik90kalikiana_: yes I can do that..well that's the least I can do :)14:34
timpnik90, kalikiana_ an example program (as small as possible) that shows the bug included in the bug report is always useful :) I guess for this one, it would need to include a tiny db14:35
nik90timp: I will innclude a sample program where you just need to download the file and run it to see the bug. Good point14:35
timpnik90: awesome. that eliminates the need to hunt down people to figure out how to reproduce the bug :)14:36
nik90kalikiana_: I hope those bug fixes propogate to a ppa for easy testing and I will rally people to do the bug reporting and testing to help you.14:37
nik90timp, kalikiana_: added test program.14:48
nik90to bug report14:48
nik90mhall119: I have another tutorial which shows how to add content to the ubuntu welcome screen infographics. -> http://nik90.com/adding-infographics-to-ubuntu-phone/14:52
nik90mhall119: you think that would be good for the tutorial page?14:52
mhall119nik90: I'll have to check with some people, last I heard we didn't want to recommend that API just yet14:56
nik90mhall119: oh. I wasn't aware of that14:58
mhall119nik90: it's been a while, so it may have changed14:59
mhall119I don't even remember the reasons for it, tbh14:59
jdstrandnik90: it worked great. thanks!14:59
nik90jdstrand: u r welcome :-)15:00
nik90mhall119: no worries. Although the core apps like music are already using it now15:00
nik90and clock will use it soon enough to indicate the alarms15:01
mhall119nik90: that's fine, I think, I'm just not sure if non-core-apps should be using it yet15:01
nik90ok15:02
mhall119nik90: it may have been that we didn't have the apparmor policy back then, IIRC15:02
nik90true15:04
=== matiasb1 is now known as matiasb
jdstrandnik90, mhall119: fyi, I just learned that Qt.inputMethod.hide() will hide the osk. This might be a good addition to http://developer.ubuntu.com/apps/qml/tutorial/ubuntu-on-screen-keyboard-tricks/. Eg, I used nik90's method to always show the button. Then I use in onClicked for that button: Qt.inputMethod.hide()15:25
mhall119thanks jdstrand15:28
=== charles_ is now known as charles
nik90jdstrand: ah thnx that is a useful method.16:01
=== sarnold_ is now known as sarnold
=== gatox is now known as gatox_lunch
mhall119new app dev video: http://www.youtube.com/watch?v=8Hhtd2JUBZo&feature=youtu.be16:47
=== marcoceppi_ is now known as marcoceppi
=== gatox_lunch is now known as gatox
=== boiko_ is now known as boiko
ahayzennik90, thanks for the email :)20:23
nik90ahayzen: :)20:24
* ahayzen subscribes to the bugs20:24
nik90ahayzen: I think those bugs are not critical stoppers for the music-app20:24
nik90since you wouldn't be anyway showing both the playlist name and tracks at the same time?20:25
ahayzennik90, well the recent list is pretty much work other than the sorting20:25
ahayzennik90, i need to filter the tracks by a playlist name :/20:25
nik90true, but why dont you use a index for playlist names alone where you can do the playlist name sorting20:26
nik90with that you can get the docID and use that to retrieve the tracks separately?20:26
nik90we have the issue when we try to combine both of them in a single query20:26
ahayzennik90, doesn't it only give u the first track of each though IIRC?20:27
nik90this is just a workaround. Obviously the fix would make life easier but until then a temp solution would suffice20:27
nik90nope using a repeater, I was able to show all the tracks20:27
ahayzennik90, yeah but then the swipeDelete/reordering is a nightmare ;)20:27
=== wendar_ is now known as wendar
nik90ahayzen: oh yeah :P20:28
nik90btw were you able to achieve reordering in a listview?20:28
nik90normally...(no reference to u1db)20:29
ahayzennik90, hehe we have a custom implementation20:29
ahayzennik90, i'm working on one which is portable for any listview :)20:29
nik90nice!20:29
ahayzennik90, thts the plan anyway :P20:29
ahayzennik90, just need some patches to land in the UITK first20:30
nik90good luck!20:30
ahayzenthanks lol20:31
nik90I meant that sincerely :) it will benefit other devs as well20:31
ahayzenhopefully it will20:31
labsinWhat's the best way to package my libs with my click app? If I link my executable to shared libraries that aren't in the default images, do I need to copy and relink them, or can I use some CMake magic?20:38
mhall119labsin: you'll need the libs in your .click package, yes20:39
mhall119labsin: there's still some work underway to support multi-arch libs, so it may not fully work just yet20:39
labsinmhall119, I saw the commit just 2h ago20:39
labsinBut I was wondering if I really need to copy all my libs to lest say ./lib and then link them, or do you know any convenient ways?20:40
mhall119I believe the work being done will support a specific folder structure, and automatically allow linking to libs in those20:45
mhall119click apps are all launched by an upstart process, which will be capable of adding the right library folder to use for linking at runtime20:46
nik90balloons: ping20:54
balloonsnik90, pong20:55
balloonsI know I have a pending review for you.. it popped up on the list of leftovers :-)20:55
nik90balloons: yup indeed :)20:55
nik90balloons: I fixed the stuff we discussed before20:55
balloonsI'll try and review today.. working on getting my devices updated20:57
balloonsexcellent.. so it should be quick and easy.. does it pass on your nexus 4?20:57
nik90It passed on my desktop :P20:57
nik90balloons: you are going to angry if I told you I have still not figured the exact process on testing on phone20:58
* nik90 ducks20:58
balloonsnik90, ohh boy, lol20:59
balloonswe should fix that20:59
nik90balloons: btw is https://bugs.launchpad.net/ubuntu-clock-app/+bug/1256864 still valid?21:02
ubot2Launchpad bug 1256864 in Ubuntu Clock App "test_alarm.TestAlarm.test_longpress_new_alarm fails on #40 on mako" [High,Confirmed]21:02
nik90if yes, can we move it to the mir project since it isnt a clock app isue?21:02
nik90issue*21:02
balloonsnik90, ohh man.. boo on me for not putting the bug number in there21:05
nik90yay one less clock bug :P21:08
nik90balloons: the continous integration failed22:41
nik90with a message Unapproved changes made after approval.22:41
balloonsahh funzies22:41
nik90But I did not make any changes22:41
balloonsI approved, should merge now22:43
nik90thnx22:52
=== salem_ is now known as _salem

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!