/srv/irclogs.ubuntu.com/2014/01/04/#ubuntu-app-devel.txt

oerl90hi04:18
=== jkeyes0 is now known as Guest24975
=== Guest24975 is now known as jkeyes0
aNickForMemsg nik90 yo you got a second for a question about local storage ?20:02
aNickForMenailed it20:02
nik90aNickForMe: hey20:02
nik90sure20:02
nik90shoot20:02
aNickForMelet me get a paste thingy togeather20:02
aNickForMenik90: why in the world is this not working ?  http://paste.ubuntu.com/6692883/20:03
aNickForMethanks20:03
aNickForMeevery thing else works20:04
aNickForMelik getDB() ect ect data base there and has data checked with sqliteman20:04
aNickForMeI will paste full DBUtils.js20:04
aNickForMehttp://paste.ubuntu.com/6692898/20:05
aNickForMeI have also tried to set the query string as   var foo = "SELECT VALUES " + rowName +" FROM Directions"   ; db.tx.executeSql(foo)20:07
nik90so in essence the function to trying to retrieve a specific entry by row name?20:08
aNickForMecorrect20:08
aNickForMelike the Row Name20:08
aNickForMebut I want to pass from many places so I want to pass like    import "Foo.js" as DataBase    .. ... ..  DataBase.getRowByName("home")20:10
nik90don't you do something similar in the getHome() function?20:10
aNickForMethe function getHome() works fine so it is not the data base it is something in the query20:10
aNickForMeI could make single rows and call by int but what if enduser works at 10 places like me20:11
aNickForMeso when there setting there work they can have many20:11
aNickForMemaybe I have to just make many tables for each20:12
aNickForMeIDK20:12
nik90I am trying to wrap my mind around your database.20:12
aNickForMehandling all this after in model is another issue20:12
nik90hmm why not wrap this whole thing inside a qml model rather than a js file?20:13
nik90let me find you an example20:13
aNickForMenik90: the data base is like this    ran =  has the program ever run ?    home = the end users home address  work = endusers work address ;20:13
nik90http://bazaar.launchpad.net/~ubuntu-clock-dev/ubuntu-clock-app/trunk/view/head:/clock/WorldClockModel.qml20:14
aNickForMelang is the end users language sysunits is like miles or KM20:14
aNickForMemaybe SELECT  statement will not allow ? , [value]20:16
nik90I would recommend using a qml listmodel as showcased in the example link I posted. The advantage is that handling a listmodel with data is so much easier.20:16
aNickForMenik90: yeah that is cool but it is the function that I need to get working20:17
aNickForMeit is a nice model clean too20:18
aNickForMebut model's are after I get the dang function to work.  If I had access out side chroot then I would just do this in C++20:18
aNickForMevia mysql20:18
nik90how about you change the sqlite call to something like,20:19
nik90var rs = tx.executeSql('Select index from Directions where rowName=?', rowName);20:21
nik90first mistake I see in your sqlite call is using db.tx.executeSql while it should be tx.executeSql20:21
nik90in my sqlite call, you need replace "index" with somethign more appropriate20:23
nik90aNickForMe: does that help?20:24
nik90I am not awfully comfortable with qt localstorage. I am actually trying to move away to u1db :-)20:24
nik90just had a hangout about it :P20:24
aNickForMeyeah I little but it is still not working20:25
aNickForMeI changed it to                      var rs = tx.executeSql('Select ? from Directions',[rowName]);   but it is returning undefined20:25
aNickForMemy bad typo20:27
nik90did you use the caps like SELECT, FROM etc etc?20:27
nik90I made that mistake in my reply.20:27
aNickForMeyeah it is returning the objects for some reason now20:27
aNickForMeit console.logs    [object Object] [object Object]20:27
aNickForMelet me paste the function again20:29
nik90I dont see rowName property in the sqlite entries20:29
aNickForMehttp://paste.ubuntu.com/6693033/20:29
nik90which property are you trying to match it against?20:29
aNickForMenik90: that is what I am getting from another page20:29
nik90aNickForMe: I know. But since you are effectively trying to get the data from another page and match it with the data in one of the entries in the table, which property are you comparing it against?20:30
aNickForMeimport "components/database.js" as DataBase                onClicked:{var q = DataBase.getRowByName("home");   console.log(q)   }20:31
nik90aNickForMe: ah okay. That makes sense now.20:32
aNickForMeComponent.onCompleted: {20:32
aNickForMe                 DataBase.createInit()20:32
aNickForMe                var c = "home"20:32
aNickForMe                console.log("YO YO YO YO "  +DataBase.getRowByName("home"))20:32
aNickForMethat returns    YO YO YO YO [object Object][object Object]20:33
aNickForMeand not the string20:33
nik90I am sorry but I am not really sure what the issue is with the code20:41
=== Ursinha-afk is now known as Ursinha
=== Ursinha is now known as Guest43575
aNickForMeme either I am looking at the source code for location qml plugin20:47
aNickForMeI know why it is retuning the object I just want to figure out how to change it know20:48
aNickForMenik90: you def helped with the string for the query20:48
aNickForMethat was the big issue20:48
nik90hmm okay :-)..20:48
nik90I guess you need to access individual properties of the object somehow20:48
nik90so in your case that would be r.somepropertyname20:49
nik90that's what you need to figure out I guess20:49
=== Guest43575 is now known as Ursinha
=== Ursinha is now known as Guest30084
aNickForMenik90: thanks again.21:42
aNickForMejust got done reading the qmlsqldatabase_executeSql   function good stuff21:43
PublicStaticVoidThis is the app development chanel21:50
PublicStaticVoidwhere is the OS development chanel?21:50
PublicStaticVoidChannel*21:50
nik90PublicStaticVoid: join #ubuntu-touch22:11
nik90for OS development or any question related to Ubuntu Touch22:11
ahayzennik90, awesome session on U1DB earlier. I've just started trying to figure out how to move our playlists/recently played data over to U1DB for the music-app22:11
nik90ahayzen: thnx mate22:12
nik90ahayzen: I am working on a sample app now to illustrate dyanmic document storage and retrieval stuff22:12
ahayzennik90, playlists is an interesting one. because u can have many playlists and many tracks in each playlist22:12
ahayzennik90, cool :)22:13
nik90I think there you would have one document per playlist22:13
nik90and each document will have the song name, duration as properties22:13
ahayzennik90, yeah either 1 document per playlist or 1 per track in each playlist?22:13
nik90but I am new to this as well. So I would recommend running it by stuart later.22:14
nik90yup both should work22:14
ahayzennik90, i think the former should work but yh i'm new so will have a play :)22:14
nik90exactly22:14
nik90:)22:14
ahayzennik90, the only thing we were wondering is that we want *some* data to be synced and some not (eg settings synced but not playlists) so would these be best in diffferent databases?22:15
dakerahayzen: wait what session ?22:16
ahayzendaker, https://plus.google.com/113051860352311525753/posts/UUjKWV3wGyi22:17
dakerahayzen: aha!22:18
ahayzendaker, :)22:18
nik90ahayzen: regarding the sync part I am not sure. But as mentioned by stuart, sync is pretty much uncharted territory :) so hard to say22:21
ahayzennik90, yep understood, we were just trying to think of limitations with our data. Did u say some community apps are currently using U1DB?22:22
nik90ahayzen: yup. Take a look at geldliste, saucybacon, ubuntu tasks (created as part of app developer showdown)22:23
ahayzennik90, cool thanks :)22:23
nik90also word chain22:23
PublicStaticVoidnik90: Okay?22:24
PublicStaticVoid#ubuntu-touch22:24
nik90PublicStaticVoid: I forgot to ask if you are referring to Ubuntu Touch or Ubuntu development22:24
nik90PublicStaticVoid: for Ubuntu OS development go to #ubuntu-devel I think22:24
PublicStaticVoidUbuntu Touch is for phones.. right?22:25
nik90PublicStaticVoid: well for now yes...eventually tablet, tv :)22:25
PublicStaticVoidI installed the package while installing from net install today22:26
PublicStaticVoidThought it was a DE for my touchscreen haha22:26
PublicStaticVoidDunno what it gave me22:26
nik90lol22:27
PublicStaticVoidnik90: Is there a beta for touch on touchscreen laptops x86_6423:09
nik90PublicStaticVoid: Well the shell that you see in Touch called Unity 8 can be run on a laptop. so that's a yes to your question23:19
nik90it is obviously not yet suitable for a desktop yet. but the convergence work is undergoing.23:19
nik90PublicStaticVoid: here is a video of it running on a touchscreen laptop http://www.google.nl/url?sa=t&rct=j&q=&esrc=s&source=web&cd=9&cad=rja&ved=0CGwQtwIwCA&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DK5BKtXpWN1A&ei=NJfIUsjKLenN0QXYz4HgDQ&usg=AFQjCNHstUcaddrkZ3z0ZtM_r_9oRJAiJQ&sig2=bkGNlR4TB2oKO4CE-O3RtQ23:21
nik90sorry that's a huge url. use this one -> http://www.youtube.com/watch?v=K5BKtXpWN1A23:22
nik90PublicStaticVoid: if you are on ubutu 13.10, you can install it using sudo apt-get install unity823:23
nik90and then run by "unity8 -mousetouch"23:24

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