=== 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 | ||
mike00 | is there any appdevs in chat who can help me with U1db ? | 08:55 |
---|---|---|
popey | mike00: kalikiana_ may be able to help | 09:00 |
mike00 | ok, thanks popey | 09:00 |
kalikiana_ | mike00: What seems to be the problem? | 09:04 |
mike00 | it seems I have no module | 09:05 |
mike00 | installed | 09:06 |
mike00 | kalikiana_: when I write "import U1db 1.0 as U1db" it's underlined... | 09:09 |
mike00 | sorry kalikiana_, the module is installed, I was confused with another module | 09:14 |
mike00 | but 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 |
mike00 | so 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 yourself | 09:20 |
kalikiana_ | Arguably a phone is a lot easier, depending on what you're experienced with. | 09:20 |
mike00 | I'm not so expert so I think the phone is ok | 09:23 |
mike00 | but how can I set a database to save data on the phone? | 09:24 |
mike00 | 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... | 09:30 |
=== chihchun is now known as chihchun_afk | ||
mike00 | 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 | 09:52 |
=== chihchun_afk is now known as chihchun | ||
mike00 | now I installed the app on the phone but it doesn't work.... | 09:52 |
mike00 | kalikiana_ can you help me? | 09:53 |
kalikiana_ | mike00: There's no applicationName | 09:56 |
mike00 | is it a big problem? | 09:57 |
kalikiana_ | On the phone, under confinement, it won't be using the correct folder to save the file | 09:57 |
kalikiana_ | Which depends on the name | 09:57 |
kalikiana_ | The name is something like "mike.myapp" | 09:57 |
kalikiana_ | You should see it in QtCreator | 09:58 |
mike00 | ok thanks kalikiana_, I'll try | 09:58 |
mike00 | thanks, kalikiana_ now the app works also on the phone | 09:59 |
kalikiana_ | Cool | 09: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 |
ubot5 | bug 1540240 in ubuntu-ui-toolkit (Ubuntu) "Automatic Header height adjustment should be optional " [Medium,In progress] https://launchpad.net/bugs/1540240 | 10:05 |
t1mp | kalikiana_: agreed, I now also think that the header needs an additional property | 10:06 |
t1mp | kalikiana_: but maybe Header, not PageHeader. Since you may want to disable the auto-height even if you have a custom header | 10:07 |
kalikiana_ | t1mp: Yeah, it's a more fundamental behavior that doesn't depend on the "convenience" of PageHeader. | 10:10 |
t1mp | kalikiana_: Page.header could be set to a non-Header Item.. but then app devs can add the property there themselves | 10:19 |
t1mp | 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 |
t1mp | but that would be changing the current behavior | 10: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 UX | 10:31 |
kalikiana_ | +sense | 10:31 |
t1mp | so I could add something PageHeader { property bool keepHeight: false } | 10:32 |
t1mp | and if the property does not exist, it is assumed to be 'true'? | 10:32 |
t1mp | so Header / Item heights would not be automatically updated. | 10:32 |
t1mp | hmm, keepHeight is not good. Better a property that indicates that the header height will be updated when set to 'true'. | 10:33 |
t1mp | PageHeader.automaticHeight: true | 10:33 |
kalikiana_ | Yeah, that sounds sensible to me. | 10:34 |
t1mp | and Page.header height will only be updated automatically when page.header.hasOwnProperty("automaticHeight") && page.header.automaticHeight | 10:34 |
kalikiana_ | t1mp: Do you want to review this one? https://code.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/persistentSelection/+merge/298014 | 11:09 |
t1mp | kalikiana_: 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 | ||
mike00 | 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:51 |
kalikiana_ | mike00: matLunedi.contents.primaOra | 11:55 |
mike00 | does it work also in a ListItemLayout? in title.text ? | 11:58 |
mike00 | because I put "title.text: i18n.tr(matLunedi.contents.primaOra)" and there is no text in that ListItemLayout... | 12:00 |
mike00 | I tried without i18n.tr but I got "Unable to assign [undefined] to QString" in the application output tab... | 12:00 |
mike00 | kalikiana_ neither in other simple text I can see the value of primaOra, there is no text... | 12:07 |
mike00 | kalikiana_ I need your help | 12:33 |
mike00 | kalikiana_: 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 |
t1mp | kalikiana_: should Header.automaticHeight also affect whether the header counts in getting the max header height for all columns? | 13:17 |
t1mp | so 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 |
t1mp | no, I was thinking that setting automaticHeight to false only prevents the APL from changing the height value of that header instance. | 13:18 |
t1mp | kalikiana_: so you expect automaticHeight: falso also to make that header height not to affect the other headers | 13:19 |
t1mp | *false | 13: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 |
t1mp | right | 13: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 |
t1mp | right | 13:33 |
=== chihchun is now known as chihchun_afk | ||
=== chihchun_afk is now known as chihchun | ||
mike00 | kalikiana_: I see if I write something like this "Page {Component.onCompleted {matLunedi.contents = {primaOra: "Diritto"}} }" , than "matLunedi.contents.primaOra" works correctly | 15:24 |
mike00 | any appdevs here can help me setting a screensaver to keep the screen on in my qmake app, please? | 15:25 |
mike00 | 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:45 |
mike00 | the first time I open the app I have to set the u1db.Document via js... | 15:57 |
mike00 | appdevs, 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 paste | 16:13 |
kalikiana_ | but now you set it to {} so the document is empty | 16:13 |
mike00 | kalikiana_ but without JavaScript I can get the default value and apply to a text... | 16:14 |
mike00 | kalikiana_, so now I clear the default because it was unuseful | 16:15 |
kalikiana_ | You mean .defaults didn't work? | 16:16 |
mike00 | I didn't know I can use .default, I think I can use only .contents ... | 16:17 |
mike00 | thanks kalikiana_, but in the code I have another problem: when I change the Document in the Dialog | 16:18 |
mike00 | kalikiana_: 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 document | 16:31 |
mike00 | thanks kalikiana_, I'll try, but I I can't use .defaluts: it doeasn't work... | 16:33 |
mike00 | kalikiana_: 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 |
mike00 | kalikiana_ so it's correct http://pastebin.ubuntu.com/17704702/ ? | 16:39 |
kalikiana_ | Yeah | 16:40 |
mike00 | thanks | 16:40 |
mike00 | kalikiana_ 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 condition | 16:43 |
kalikiana_ | (Or maybe you found a bug) | 16:43 |
mike00 | when I start the app the first time I define "matLunedi.defaults", not "matLunedi.contents" ... | 16:44 |
mike00 | so "matLunedi.contents" isn't yet defined... | 16:45 |
mike00 | but kalikiana_, I don't understand what does defaults is needed: if I can't get its value... | 16:47 |
t1mp | kalikiana_: fyi, https://code.launchpad.net/~tpeeters/ubuntu-ui-toolkit/apl-header-height/+merge/298166 | 20:15 |
t1mp | 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. | 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!