/srv/irclogs.ubuntu.com/2016/06/22/#ubuntu-app-devel.txt

=== 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
mike00is there any appdevs in chat who can help me with U1db ?08:55
popeymike00: kalikiana_ may be able to help09:00
mike00ok, thanks popey09:00
kalikiana_mike00: What seems to be the problem?09:04
mike00it seems I have no module09:05
mike00installed09:06
mike00kalikiana_: when I write "import U1db 1.0 as U1db" it's underlined...09:09
mike00sorry kalikiana_, the module is installed, I was confused with another module09:14
mike00but I can understand how U1db works...09:15
kalikiana_What kit are you using?09:17
kalikiana_U1Db isn't in the "Desktop" kit afair so you need an armhf or i386 chroot.09:17
mike00so I have to run the project on the phone?09:18
kalikiana_Not necessarily, although there's (currently) no one-click way to run something out of a chroot.09:20
kalikiana_You need to set the environment yourself09:20
kalikiana_Arguably a phone is a lot easier, depending on what you're experienced with.09:20
mike00I'm not so expert so I think the phone is ok09:23
mike00but how can I set a database to save data on the phone?09:24
mike00kalikiana_ 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...09:30
=== chihchun is now known as chihchun_afk
mike00I 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 Db09:52
=== chihchun_afk is now known as chihchun
mike00now I installed the app on the phone but it doesn't work....09:52
mike00kalikiana_ can you help me?09:53
kalikiana_mike00: There's no applicationName09:56
mike00is it a big problem?09:57
kalikiana_On the phone, under confinement, it won't be using the correct folder to save the file09:57
kalikiana_Which depends on the name09:57
kalikiana_The name is something like "mike.myapp"09:57
kalikiana_You should see it in QtCreator09:58
mike00ok thanks kalikiana_, I'll try09:58
mike00thanks, kalikiana_ now the app works also on the phone09:59
kalikiana_Cool09:59
kalikiana_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
ubot5bug 1540240 in ubuntu-ui-toolkit (Ubuntu) "Automatic Header height adjustment should be optional " [Medium,In progress] https://launchpad.net/bugs/154024010:05
t1mpkalikiana_: agreed, I now also think that the header needs an additional property10:06
t1mpkalikiana_: but maybe Header, not PageHeader. Since you may want to disable the auto-height even if you have a custom header10:07
kalikiana_t1mp: Yeah, it's a more fundamental behavior that doesn't depend on the "convenience" of PageHeader.10:10
t1mpkalikiana_: Page.header could be set to a non-Header Item.. but then app devs can add the property there themselves10:19
t1mpalternatively, 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
t1mpbut that would be changing the current behavior10:20
kalikiana_t1mp: PageHeader could have a different default behavior than Header (which imho is fine to require to get this functionality)10:30
kalikiana_It might make that PageHeader is the one more tailored towards the preferred UX10:31
kalikiana_+sense10:31
t1mpso I could add something PageHeader { property bool keepHeight: false }10:32
t1mpand if the property does not exist, it is assumed to be 'true'?10:32
t1mpso Header / Item heights would not be automatically updated.10:32
t1mphmm, keepHeight is not good. Better a property that indicates that the header height will be updated when set to 'true'.10:33
t1mpPageHeader.automaticHeight: true10:33
kalikiana_Yeah, that sounds sensible to me.10:34
t1mpand Page.header height will only be updated automatically when page.header.hasOwnProperty("automaticHeight") && page.header.automaticHeight10:34
kalikiana_t1mp: Do you want to review this one? https://code.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/persistentSelection/+merge/29801411:09
t1mpkalikiana_: are you changing the current default behavior there?11:14
kalikiana_t1mp: That depends which Qt version you're using.11:15
=== mzanetti_ is now known as mzanetti
=== javiercrowsoft1 is now known as javiercrowsoft
mike00hi 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:51
kalikiana_mike00: matLunedi.contents.primaOra11:55
mike00does it work also in a ListItemLayout? in title.text ?11:58
mike00because I put "title.text: i18n.tr(matLunedi.contents.primaOra)" and there is no text in that ListItemLayout...12:00
mike00I tried without i18n.tr but I got "Unable to assign [undefined] to QString" in the application output tab...12:00
mike00kalikiana_ neither in other simple text I can see the value of primaOra, there is no text...12:07
mike00kalikiana_ I need your help12:33
mike00kalikiana_: Have I "matLunedi.contents = {primaOra: "Diritto"}" in "Page {Component.onCompleted {...} }" ???12:45
kalikiana_Perhaps you can post a complete snippet of what you're trying now?13:10
kalikiana_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
kalikiana_Rather than the individual document.13:11
t1mpkalikiana_: should Header.automaticHeight also affect whether the header counts in getting the max header height for all columns?13:17
t1mpso in case there is one very high header, and you want the other headers to ignore that one...13:18
kalikiana_t1mp: Oh, I thought that was implied.13:18
kalikiana_From my point of view it's the point of it.13:18
t1mpno, I was thinking that setting automaticHeight to false only prevents the APL from changing the height value of that header instance.13:18
t1mpkalikiana_: so you expect automaticHeight: falso also to make that header height not to affect the other headers13:19
t1mp*false13:19
kalikiana_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:20
t1mpright13:21
kalikiana_And once I have a custom header, APL can't be that smart anymore, so a clean opt-out makes sense to me.13:21
kalikiana_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:23
t1mpright13:33
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
mike00kalikiana_: I see if I write something like this "Page {Component.onCompleted {matLunedi.contents = {primaOra: "Diritto"}} }" , than "matLunedi.contents.primaOra" works correctly15:24
mike00any appdevs here can help me setting a screensaver to keep the screen on in my qmake app, please?15:25
mike00can any appdevs help me with this app http://pastebin.ubuntu.com/17701989/ ? I think I didn't understand how should I use u1db...15:45
mike00the first time I open the app I have to set the u1db.Document via js...15:57
mike00appdevs, how can I define the u1db.Document without using JavaScript?16:00
=== chihchun is now known as chihchun_afk
kalikiana_mike00: that's what defaults: is for, which you used in your original paste16:13
kalikiana_but now you set it to {} so the document is empty16:13
mike00kalikiana_ but without JavaScript I can get the default value and apply to a text...16:14
mike00kalikiana_, so now I clear the default because it was unuseful16:15
kalikiana_You mean .defaults didn't work?16:16
mike00I didn't know I can use .default, I think I can use only .contents ...16:17
mike00thanks kalikiana_, but in the code I have another problem: when I change the Document in the Dialog16:18
mike00kalikiana_: how can I change only a property in the Document without deleting the others?16:25
kalikiana_Something like this? var c = matLunedi.contents; c['primaOra'] = editField.text; matLunedi.contents = c;16:30
kalikiana_you can use a variable ("c" above) to modify different values until you change the real document16:31
mike00thanks kalikiana_, I'll try, but I I can't use .defaluts: it doeasn't work...16:33
mike00kalikiana_: I wrote: "title.text: i18n.tr(matLunedi.defaults.primaOra)" but the ListItemLayout is all white..16:37
kalikiana_mike00: Ah. Sorry, I wasn't very clear. You should use defaults only when declaring the "Document", not when using it.16:38
kalikiana_So that's the values that gets set for contents the first time it's created.16:39
kalikiana_So instead of the code in Component.onCompleted, you put the initial values into defaults:16:39
mike00kalikiana_ so it's correct http://pastebin.ubuntu.com/17704702/ ?16:39
kalikiana_Yeah16:40
mike00thanks16:40
mike00kalikiana_ but when I run the first time the app "matLunedi.contents" is empty?16:42
kalikiana_It shouldn't be, unless there's a race condition16:43
kalikiana_(Or maybe you found a bug)16:43
mike00when I start the app the first time I define "matLunedi.defaults", not "matLunedi.contents" ...16:44
mike00so "matLunedi.contents" isn't yet defined...16:45
mike00but kalikiana_, I don't understand what does defaults is needed: if I can't get its value...16:47
t1mpkalikiana_: fyi, https://code.launchpad.net/~tpeeters/ubuntu-ui-toolkit/apl-header-height/+merge/29816620:15
t1mpkalikiana_: or wait with that, maybe I have to sync staging first after https://code.launchpad.net/~zsombi/ubuntu-ui-toolkit/moveStyledItem/+merge/296802 lands.20:18
=== JanC is now known as Guest75719
=== JanC_ is now known as JanC

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