[09:20] Mirv: try giving wdith/ height to the delegate [09:20] er [09:20] I guess the guy left, sorry Timo [09:21] kalikiana, ping :) [09:21] hey randomcpp [09:22] I can't get Index and Query work with my defaults [09:23] here's my Document default defaults: { "title": "", "category": [ ], "difficulty": "normal", [09:23] "preptime": "0", "cooktime": "0", "totaltime": "0", "ingredients": [ ], [09:23] "directions": "", "servings": 4, "images" : [ ] } [09:24] the expression I use are: [ "title", "ingredients.name" ] [09:25] then even if I set [ { "name": "*", "title": "*" } [09:25] as query none are matched [09:30] what do you want to filter out? [09:30] or, match rather [09:33] I'd like to implement some sort of search by matching the first letters the user inputs in a textfield, I need to filter by recipe title and by ingredients.name [09:34] maybe something like this: expression: [ "title" ] [09:34] query: [ { "title": keywords + "*" } ] [09:36] then set queryId as model, right? [09:37] if that's the Query, yes [09:40] in the delegate, how do I access the value? [09:44] ReferenceError: contents is not defined [09:45] hmm that should work ie contents.title [10:03] kalikiana, :/ if you have some spare time, you can pull the latest commits from my repo and take a look, it's everything under ui/SearchPage.qml [10:40] Hey guys! I have some questions concerning how to use U1DB. I hope you can help me: [10:40] Right now, I read in the content of the database in an Array via Component.onCompleted in the database. I add entries via Database.putDoc(). Is this the way it is supposed to be done? Or can I use for example the Database directly as a Model for Repeater or ListView? [10:40] Furthermore, is the Document-Element backed by the database? So if the database gets updated (e.g. from another PC) is the Document updated? And if I change the contents of the Document, does this get stored in the Database? [10:40] And: when do I use Document.defaults and when Document.contents? [10:40] I know, quite a few questions. I hope you can help me. [10:42] yes use Database.putDoc( contents ) to add a new entry, and Database.putDoc( newcontents, id ) to update an entry [10:43] then pass the db id to a listview to show all you elements [10:44] you use Document.defaults to define a base Document template you want to use, then to create/edit entries you use putDoc [10:45] then jGleitz ask kalikiana for more info :) [11:04] @randomcpp: Thank you very much, that helped me already. But: What is the Document good for? If I use putDoc(), I really don’t need it. Because a basic template could easily be done via a JavaScript-Function. [11:04] Furthermore, if I have different types of entries to store and only want to show some i a ListView, how do I do that? Use multiple Databases, one for each sort of entry, or can I somehow restrict the output? [11:06] jGleitz, you can use Index and Query, but actually I have some problems to get them working, there are some samples in the u1db-qt source code, lp:u1db-qt [11:06] bzr branch lp:u1db-qt [11:11] @randomcpp: Yeah, I already saw this. But in fact, neither the docs nor the examples could tell me how to use them. [11:11] But: Thanks :) [11:11] jGleitz, ehehe if you figure out something tell me :) [11:20] balloons, hi there! :) [11:21] balloons, can you help me please with my commits? :) Look please at https://code.launchpad.net/~mrqtros/ubuntu-rssreader-app/unified-tabs/+merge/180627 [12:13] kalikiana: ping [12:37] why doesn't ubuntusdk use qt5.1? [12:40] randomcpp: qt5.1 wasn't release when the sdk was out. It will be ported to 5.1 soon enough. Dont have an ETA though. [12:43] thanks nik90 [12:50] nik90, which one do you prefer? http://imgur.com/a/9GCHR (don't look at the slider in the first screenshot) [12:53] randomcpp: more leaning towards 1st one. I will have a look at ubuntu design to check if that is okay [12:55] randomcpp: looking at http://design.ubuntu.com/apps/building-blocks/option-selector, looks like the first screenshot is also acceptable design wise [12:55] randomcpp: which one did you prefer personally? [12:57] currently i'm using the second one, but I don't which one is better atm [12:58] brb [12:58] sure [13:00] nik90: any idea if theres an example of u1db being used in a javascript file? [13:01] are there any system apis about ubuntu touch systeminfomation [13:05] xqwzts: the u1db api syntax should be similar to the one in qml [13:05] there was one document which provided this info [13:05] randomcpp: do you have link to u1db documentation? [13:05] which one? [13:05] I cannot seem to remember where i saved it [13:05] u1db-qt? [13:06] yes [13:06] a sec [13:06] http://developer.ubuntu.com/api/devel/ubuntu-13.10/qml/u1db-qt5/index.html [13:06] nik90, ^^^ [13:06] xqwzts: there you go ^^ [13:07] randomcpp: nik90: thanks [13:07] np [13:07] ive been trying Qt.createQmlObject() to create my docs [13:07] randomcpp, xqwzts http://people.ubuntu.com/~mhall119/u1db-qt/u1db-qt-cheatsheet.html [13:07] might be able to do it with putDoc() [13:08] nik90: that [and the examples] all assume you're in a qml document [13:08] not the same syntax for js [13:11] I am going out.. [15:46] kalikiana, ping [17:16] nik90, photo feature is now working :D [18:01] hi, Ubuntu Touch question. I've seen guidelines on expansion of list Items here: http://design.ubuntu.com/apps/building-blocks/expansion. IS there an API or example of this? Or only the mockup? [18:21] @labsin: There is no API, only the mockup. See https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1169258 [18:21] Launchpad bug 1169258 in Ubuntu UX "There is no ListItem implementing the expansion behaviour" [High,In progress] [22:00] nik90, http://i.imgur.com/z0dSZtD.png [22:01] randomcpp: wow looking much better and organised! [22:01] randomcpp: did it have online search or did you write this recipe? [22:01] that page just needs a way to modify/set the servings and it's ready [22:02] I copied manually [22:02] ok [22:02] I've asked BigOven for API access, but they still haven't replied [22:02] I think I'll find another service [22:03] local search doesn't work either yet, due to some strange u1db behaviour [22:04] yeah some kind of online API would really help since I am too lazy to write my own recipes :P [22:04] it's planned [22:05] but I can't find a good service with a high request limit [22:06] ah [22:06] http://food2fork.com/about/api [22:06] 500 calls per day [22:07] IIRC BigOven has a limit of 1000 calls per hour [22:08] the 1000/hour should be sufficient [22:08] BigOven seems like a nice contentder [22:08] or 100/hour [22:08] it was better than food3fork [22:09] food2fork* [22:09] randomcpp: if you code it right, changing online sources should be quite simple [22:09] 100/hour not 1000/hour [22:09] should be essential the source url, json or xml tags for a particular information [22:09] okay [22:18] yummly has 500 api calls/day [22:20] randomcpp: how about combining them all? As in if for instance you run out of API calls for Yummy, I am guessing it sends a error message. When this happens, move it another online API seemlessly. [22:20] so from the user perspective, they do not notice anything [22:21] it seems an acceptable solution [22:21] 01:03:12 randomcpp | local search doesn't work either yet, due to some strange u1db behaviour [22:21] randomcpp: are you having trouble with the index/query too? [22:21] xqwzts, yeah [22:22] I can't even get section to work [22:23] section? [22:23] http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-listview.html#section.criteria-prop [22:24] ah [22:25] i could only get querying to work on 1 field, and it seems to return the result of that field not the whole document [22:26] i suspect im doing something wrong but cant figure out what [22:26] or that's how u1db queries are supposed to work :P [22:26] <_5m0k3> Any way to open a popuputils (popover, dialog, sheet, etc) from js? [22:28] _5m0k3, onTriggered: PopupUtils.open(Qt.resolvedUrl("DeleteDialog.qml")) [22:30] xqwzts, me too, sometimes it returns only the search query xD [22:32] xqwzts, document deletion doesn't work either [22:37] randomcpp: yup noticed that too [22:37] will try to ask kalikiana about this stuff tomorrow [22:37] I don't think switching to localStorage will be too difficult [22:38] [if necessary] [22:57] good night :)