=== chihchun_afk is now known as chihchun === chihchun is now known as chihchun_afk === chihchun_afk is now known as chihchun === irv_ is now known as irv === voldyman_ is now known as voldyman [08:55] is there any appdevs in chat who can help me with U1db ? [09:00] mike00: kalikiana_ may be able to help [09:00] ok, thanks popey [09:04] mike00: What seems to be the problem? [09:05] it seems I have no module [09:06] installed [09:09] kalikiana_: when I write "import U1db 1.0 as U1db" it's underlined... [09:14] sorry kalikiana_, the module is installed, I was confused with another module [09:15] but I can understand how U1db works... [09:17] What kit are you using? [09:17] U1Db isn't in the "Desktop" kit afair so you need an armhf or i386 chroot. [09:18] so I have to run the project on the phone? [09:20] Not necessarily, although there's (currently) no one-click way to run something out of a chroot. [09:20] You need to set the environment yourself [09:20] Arguably a phone is a lot easier, depending on what you're experienced with. [09:23] I'm not so expert so I think the phone is ok [09:24] but how can I set a database to save data on the phone? [09:30] kalikiana_ I tried to follow the guide here "https://developer.ubuntu.com/api/apps/qml/sdk-15.04.4/U1db.tutorial/" but I didn't understand how u1db works... === chihchun is now known as chihchun_afk [09:52] I get this code (http://pastebin.ubuntu.com/17688151/) from internet and when I try to run in on the pc, close the app and rerun, the app keep the changes I saved in the Db === chihchun_afk is now known as chihchun [09:52] now I installed the app on the phone but it doesn't work.... [09:53] kalikiana_ can you help me? [09:56] mike00: There's no applicationName [09:57] is it a big problem? [09:57] On the phone, under confinement, it won't be using the correct folder to save the file [09:57] Which depends on the name [09:57] The name is something like "mike.myapp" [09:58] You should see it in QtCreator [09:58] ok thanks kalikiana_, I'll try [09:59] thanks, kalikiana_ now the app works also on the phone [09:59] Cool [10:05] t1mp: re AdaptivePageLayout.implicitHeaderHeight/maximumHeaderHeight (bug 1540240), your proposed API seems reversed to me. I'd rather expect a property in PageHeader to say "don't grow this one to fit other headers" and have APL respect that. That way you're not tying Page to APL in a weird way and it actually seems more intuitive to me for the use case. [10:05] bug 1540240 in ubuntu-ui-toolkit (Ubuntu) "Automatic Header height adjustment should be optional " [Medium,In progress] https://launchpad.net/bugs/1540240 [10:06] kalikiana_: agreed, I now also think that the header needs an additional property [10:07] kalikiana_: but maybe Header, not PageHeader. Since you may want to disable the auto-height even if you have a custom header [10:10] t1mp: Yeah, it's a more fundamental behavior that doesn't depend on the "convenience" of PageHeader. [10:19] kalikiana_: Page.header could be set to a non-Header Item.. but then app devs can add the property there themselves [10:20] alternatively, we can change the default behavior to not automatically change the height of the headers in the columns, and set a property to make it change.. [10:20] but that would be changing the current behavior [10:30] t1mp: PageHeader could have a different default behavior than Header (which imho is fine to require to get this functionality) [10:31] It might make that PageHeader is the one more tailored towards the preferred UX [10:31] +sense [10:32] so I could add something PageHeader { property bool keepHeight: false } [10:32] and if the property does not exist, it is assumed to be 'true'? [10:32] so Header / Item heights would not be automatically updated. [10:33] hmm, keepHeight is not good. Better a property that indicates that the header height will be updated when set to 'true'. [10:33] PageHeader.automaticHeight: true [10:34] Yeah, that sounds sensible to me. [10:34] and Page.header height will only be updated automatically when page.header.hasOwnProperty("automaticHeight") && page.header.automaticHeight [11:09] t1mp: Do you want to review this one? https://code.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/persistentSelection/+merge/298014 [11:14] kalikiana_: are you changing the current default behavior there? [11:15] t1mp: That depends which Qt version you're using. === mzanetti_ is now known as mzanetti === javiercrowsoft1 is now known as javiercrowsoft [11:51] hi appdevs, I have this code http://pastebin.ubuntu.com/17692044/ . how can I get the value of primaOra and put that value in a text? [11:55] mike00: matLunedi.contents.primaOra [11:58] does it work also in a ListItemLayout? in title.text ? [12:00] because I put "title.text: i18n.tr(matLunedi.contents.primaOra)" and there is no text in that ListItemLayout... [12:00] I tried without i18n.tr but I got "Unable to assign [undefined] to QString" in the application output tab... [12:07] kalikiana_ neither in other simple text I can see the value of primaOra, there is no text... [12:33] kalikiana_ I need your help [12:45] kalikiana_: Have I "matLunedi.contents = {primaOra: "Diritto"}" in "Page {Component.onCompleted {...} }" ??? [13:10] Perhaps you can post a complete snippet of what you're trying now? [13:11] If you're using ListItemLayout, I'm guessing you might be building a(n Ubuntu)ListView. In that case you'll want to use a Query to get the contents. [13:11] Rather than the individual document. [13:17] kalikiana_: should Header.automaticHeight also affect whether the header counts in getting the max header height for all columns? [13:18] so in case there is one very high header, and you want the other headers to ignore that one... [13:18] t1mp: Oh, I thought that was implied. [13:18] From my point of view it's the point of it. [13:18] no, I was thinking that setting automaticHeight to false only prevents the APL from changing the height value of that header instance. [13:19] kalikiana_: so you expect automaticHeight: falso also to make that header height not to affect the other headers [13:19] *false [13:20] t1mp: In what use case would you want a custom header, whose "native" size is respected by other columns? That seems bizarre to me. [13:21] right [13:21] And once I have a custom header, APL can't be that smart anymore, so a clean opt-out makes sense to me. [13:23] If I really want a compromise like in terms of spacing I can always override the height of the other header(s) as well - but that seems like a choice I as an app dev would need to make. [13:33] right === chihchun is now known as chihchun_afk === chihchun_afk is now known as chihchun [15:24] kalikiana_: I see if I write something like this "Page {Component.onCompleted {matLunedi.contents = {primaOra: "Diritto"}} }" , than "matLunedi.contents.primaOra" works correctly [15:25] any appdevs here can help me setting a screensaver to keep the screen on in my qmake app, please? [15:45] can any appdevs help me with this app http://pastebin.ubuntu.com/17701989/ ? I think I didn't understand how should I use u1db... [15:57] the first time I open the app I have to set the u1db.Document via js... [16:00] appdevs, how can I define the u1db.Document without using JavaScript? === chihchun is now known as chihchun_afk [16:13] mike00: that's what defaults: is for, which you used in your original paste [16:13] but now you set it to {} so the document is empty [16:14] kalikiana_ but without JavaScript I can get the default value and apply to a text... [16:15] kalikiana_, so now I clear the default because it was unuseful [16:16] You mean .defaults didn't work? [16:17] I didn't know I can use .default, I think I can use only .contents ... [16:18] thanks kalikiana_, but in the code I have another problem: when I change the Document in the Dialog [16:25] kalikiana_: how can I change only a property in the Document without deleting the others? [16:30] Something like this? var c = matLunedi.contents; c['primaOra'] = editField.text; matLunedi.contents = c; [16:31] you can use a variable ("c" above) to modify different values until you change the real document [16:33] thanks kalikiana_, I'll try, but I I can't use .defaluts: it doeasn't work... [16:37] kalikiana_: I wrote: "title.text: i18n.tr(matLunedi.defaults.primaOra)" but the ListItemLayout is all white.. [16:38] mike00: Ah. Sorry, I wasn't very clear. You should use defaults only when declaring the "Document", not when using it. [16:39] So that's the values that gets set for contents the first time it's created. [16:39] So instead of the code in Component.onCompleted, you put the initial values into defaults: [16:39] kalikiana_ so it's correct http://pastebin.ubuntu.com/17704702/ ? [16:40] Yeah [16:40] thanks [16:42] kalikiana_ but when I run the first time the app "matLunedi.contents" is empty? [16:43] It shouldn't be, unless there's a race condition [16:43] (Or maybe you found a bug) [16:44] when I start the app the first time I define "matLunedi.defaults", not "matLunedi.contents" ... [16:45] so "matLunedi.contents" isn't yet defined... [16:47] but kalikiana_, I don't understand what does defaults is needed: if I can't get its value... [20:15] kalikiana_: fyi, https://code.launchpad.net/~tpeeters/ubuntu-ui-toolkit/apl-header-height/+merge/298166 [20:18] kalikiana_: or wait with that, maybe I have to sync staging first after https://code.launchpad.net/~zsombi/ubuntu-ui-toolkit/moveStyledItem/+merge/296802 lands. === JanC is now known as Guest75719 === JanC_ is now known as JanC