/srv/irclogs.ubuntu.com/2013/08/18/#ubuntu-app-devel.txt

kalikianaMirv: try giving wdith/ height to the delegate09:20
kalikianaer09:20
kalikianaI guess the guy left, sorry Timo09:20
randomcppkalikiana, ping :)09:21
kalikianahey randomcpp09:21
randomcppI can't get Index and Query work with my defaults09:22
randomcpphere's my Document default         defaults: { "title": "", "category": [ ], "difficulty": "normal",09:23
randomcpp            "preptime": "0", "cooktime": "0", "totaltime": "0", "ingredients": [ ],09:23
randomcpp            "directions": "", "servings": 4, "images" : [ ] }09:23
randomcppthe expression I use are: [ "title", "ingredients.name" ]09:24
randomcppthen even if I set [ { "name": "*", "title": "*" }09:25
randomcppas query none are matched09:25
kalikianawhat do you want to filter out?09:30
kalikianaor, match rather09:30
randomcppI'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.name09:33
kalikianamaybe something like this: expression: [ "title" ]09:34
kalikianaquery: [ { "title": keywords + "*" } ]09:34
randomcppthen set queryId as model, right?09:36
kalikianaif that's the Query, yes09:37
randomcppin the delegate, how do I access the value?09:40
randomcppReferenceError: contents is not defined09:44
kalikianahmm that should work ie contents.title09:45
randomcppkalikiana, :/ 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.qml10:03
jGleitzHey guys! I have some questions concerning how to use U1DB. I hope you can help me:10:40
jGleitz 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
jGleitzFurthermore, 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
jGleitzAnd: when do I use Document.defaults and when Document.contents?10:40
jGleitzI know, quite a few questions. I hope you can help me.10:40
randomcppyes use Database.putDoc( contents ) to add a new entry, and Database.putDoc( newcontents, id ) to update an entry10:42
randomcppthen pass the db id to a listview to show all you elements10:43
randomcppyou use Document.defaults to define a base Document template you want to use, then to create/edit entries you use putDoc10:44
randomcppthen jGleitz ask kalikiana for more info :)10:45
jGleitz@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
jGleitzFurthermore, 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:04
randomcppjGleitz, 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-qt11:06
randomcppbzr branch lp:u1db-qt11:06
jGleitz@randomcpp: Yeah, I already saw this. But in fact, neither the docs nor the examples could tell me how to use them.11:11
jGleitzBut: Thanks :)11:11
randomcppjGleitz, ehehe if you figure out something tell me :)11:11
mrqtrosballoons, hi there! :)11:20
mrqtrosballoons, can you help me please with my commits? :) Look please at https://code.launchpad.net/~mrqtros/ubuntu-rssreader-app/unified-tabs/+merge/18062711:21
xqwztskalikiana: ping12:13
randomcppwhy doesn't ubuntusdk use qt5.1?12:37
nik90randomcpp: 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:40
randomcppthanks nik9012:43
randomcppnik90, which one do you prefer? http://imgur.com/a/9GCHR (don't look at the slider in the first screenshot)12:50
nik90randomcpp: more leaning towards 1st one. I will have a look at ubuntu design to check if that is okay12:53
nik90randomcpp: looking at http://design.ubuntu.com/apps/building-blocks/option-selector, looks like the first screenshot is also acceptable design wise12:55
nik90randomcpp: which one did you prefer personally?12:55
randomcppcurrently i'm using the second one, but I don't which one is better atm12:57
randomcppbrb12:58
nik90sure12:58
xqwztsnik90: any idea if theres an example of u1db being used in a javascript file?13:00
skyitahci_are there any system apis about ubuntu touch systeminfomation13:01
nik90xqwzts: the u1db api syntax should be similar to the one in qml13:05
nik90there was one document which provided this info13:05
nik90randomcpp: do you have link to u1db documentation?13:05
randomcppwhich one?13:05
nik90I cannot seem to remember where i saved it13:05
randomcppu1db-qt?13:05
nik90yes13:06
randomcppa sec13:06
randomcpphttp://developer.ubuntu.com/api/devel/ubuntu-13.10/qml/u1db-qt5/index.html13:06
randomcppnik90, ^^^13:06
nik90xqwzts: there you go ^^13:06
xqwztsrandomcpp: nik90: thanks13:07
randomcppnp13:07
xqwztsive been trying Qt.createQmlObject() to create my docs13:07
nik90randomcpp, xqwzts http://people.ubuntu.com/~mhall119/u1db-qt/u1db-qt-cheatsheet.html13:07
xqwztsmight be able to do it with putDoc()13:07
xqwztsnik90: that [and the examples] all assume you're in a qml document13:08
xqwztsnot the same syntax for js13:08
nik90I am going out..13:11
randomcppkalikiana, ping15:46
randomcppnik90, photo feature is now working :D17:16
labsinhi, 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:01
jGleitz@labsin: There is no API, only the mockup. See https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/116925818:21
ubot2`Launchpad bug 1169258 in Ubuntu UX "There is no ListItem implementing the expansion behaviour" [High,In progress]18:21
randomcppnik90, http://i.imgur.com/z0dSZtD.png22:00
nik90randomcpp: wow looking much better and organised!22:01
nik90randomcpp: did it have online search or did you write this recipe?22:01
randomcppthat page just needs a way to modify/set the servings and it's ready22:01
randomcppI copied manually22:02
nik90ok22:02
randomcppI've asked BigOven for API access, but they still haven't replied22:02
randomcppI think I'll find another service22:02
randomcpplocal search doesn't work either yet, due to some strange u1db behaviour22:03
nik90yeah some kind of online API would really help since I am too lazy to write my own recipes :P22:04
randomcppit's planned22:04
randomcppbut I can't find a good service with a high request limit22:05
nik90ah22:06
randomcpphttp://food2fork.com/about/api22:06
randomcpp500 calls per day22:06
randomcppIIRC BigOven has a limit of 1000 calls per hour22:07
nik90the 1000/hour should be sufficient22:08
nik90BigOven seems like a nice contentder22:08
randomcppor 100/hour22:08
randomcppit was better than food3fork22:08
randomcppfood2fork*22:09
nik90randomcpp: if you code it right, changing online sources should be quite simple22:09
randomcpp100/hour not 1000/hour22:09
nik90should be essential the source url, json or xml tags for a particular information22:09
nik90okay22:09
randomcppyummly has 500 api calls/day22:18
nik90randomcpp: 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
nik90so from the user perspective, they do not notice anything22:20
randomcppit seems an acceptable solution22:21
xqwzts01:03:12  randomcpp | local search doesn't work either yet, due to some strange u1db behaviour22:21
xqwztsrandomcpp: are you having trouble with the index/query too?22:21
randomcppxqwzts, yeah22:21
randomcppI can't even get section to work22:22
xqwztssection?22:23
randomcpphttp://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-listview.html#section.criteria-prop22:23
xqwztsah22:24
xqwztsi could only get querying to work on 1 field, and it seems to return the result of that field not the whole document22:25
xqwztsi suspect im doing something wrong but cant figure out what22:26
xqwztsor that's how u1db queries are supposed to work :P22:26
_5m0k3Any way to open a popuputils (popover, dialog, sheet, etc) from js?22:26
randomcpp_5m0k3, onTriggered: PopupUtils.open(Qt.resolvedUrl("DeleteDialog.qml"))22:28
randomcppxqwzts, me too, sometimes it returns only the search query xD22:30
randomcppxqwzts, document deletion doesn't work either22:32
xqwztsrandomcpp: yup noticed that too22:37
xqwztswill try to ask kalikiana about this stuff tomorrow22:37
xqwztsI don't think switching to localStorage will be too difficult22:37
xqwzts[if necessary]22:38
randomcppgood night :)22:57

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