oerl90 | hi | 04:18 |
---|---|---|
=== jkeyes0 is now known as Guest24975 | ||
=== Guest24975 is now known as jkeyes0 | ||
aNickForMe | msg nik90 yo you got a second for a question about local storage ? | 20:02 |
aNickForMe | nailed it | 20:02 |
nik90 | aNickForMe: hey | 20:02 |
nik90 | sure | 20:02 |
nik90 | shoot | 20:02 |
aNickForMe | let me get a paste thingy togeather | 20:02 |
aNickForMe | nik90: why in the world is this not working ? http://paste.ubuntu.com/6692883/ | 20:03 |
aNickForMe | thanks | 20:03 |
aNickForMe | every thing else works | 20:04 |
aNickForMe | lik getDB() ect ect data base there and has data checked with sqliteman | 20:04 |
aNickForMe | I will paste full DBUtils.js | 20:04 |
aNickForMe | http://paste.ubuntu.com/6692898/ | 20:05 |
aNickForMe | I have also tried to set the query string as var foo = "SELECT VALUES " + rowName +" FROM Directions" ; db.tx.executeSql(foo) | 20:07 |
nik90 | so in essence the function to trying to retrieve a specific entry by row name? | 20:08 |
aNickForMe | correct | 20:08 |
aNickForMe | like the Row Name | 20:08 |
aNickForMe | but I want to pass from many places so I want to pass like import "Foo.js" as DataBase .. ... .. DataBase.getRowByName("home") | 20:10 |
nik90 | don't you do something similar in the getHome() function? | 20:10 |
aNickForMe | the function getHome() works fine so it is not the data base it is something in the query | 20:10 |
aNickForMe | I could make single rows and call by int but what if enduser works at 10 places like me | 20:11 |
aNickForMe | so when there setting there work they can have many | 20:11 |
aNickForMe | maybe I have to just make many tables for each | 20:12 |
aNickForMe | IDK | 20:12 |
nik90 | I am trying to wrap my mind around your database. | 20:12 |
aNickForMe | handling all this after in model is another issue | 20:12 |
nik90 | hmm why not wrap this whole thing inside a qml model rather than a js file? | 20:13 |
nik90 | let me find you an example | 20:13 |
aNickForMe | nik90: the data base is like this ran = has the program ever run ? home = the end users home address work = endusers work address ; | 20:13 |
nik90 | http://bazaar.launchpad.net/~ubuntu-clock-dev/ubuntu-clock-app/trunk/view/head:/clock/WorldClockModel.qml | 20:14 |
aNickForMe | lang is the end users language sysunits is like miles or KM | 20:14 |
aNickForMe | maybe SELECT statement will not allow ? , [value] | 20:16 |
nik90 | I 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 |
aNickForMe | nik90: yeah that is cool but it is the function that I need to get working | 20:17 |
aNickForMe | it is a nice model clean too | 20:18 |
aNickForMe | but 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 |
aNickForMe | via mysql | 20:18 |
nik90 | how about you change the sqlite call to something like, | 20:19 |
nik90 | var rs = tx.executeSql('Select index from Directions where rowName=?', rowName); | 20:21 |
nik90 | first mistake I see in your sqlite call is using db.tx.executeSql while it should be tx.executeSql | 20:21 |
nik90 | in my sqlite call, you need replace "index" with somethign more appropriate | 20:23 |
nik90 | aNickForMe: does that help? | 20:24 |
nik90 | I am not awfully comfortable with qt localstorage. I am actually trying to move away to u1db :-) | 20:24 |
nik90 | just had a hangout about it :P | 20:24 |
aNickForMe | yeah I little but it is still not working | 20:25 |
aNickForMe | I changed it to var rs = tx.executeSql('Select ? from Directions',[rowName]); but it is returning undefined | 20:25 |
aNickForMe | my bad typo | 20:27 |
nik90 | did you use the caps like SELECT, FROM etc etc? | 20:27 |
nik90 | I made that mistake in my reply. | 20:27 |
aNickForMe | yeah it is returning the objects for some reason now | 20:27 |
aNickForMe | it console.logs [object Object] [object Object] | 20:27 |
aNickForMe | let me paste the function again | 20:29 |
nik90 | I dont see rowName property in the sqlite entries | 20:29 |
aNickForMe | http://paste.ubuntu.com/6693033/ | 20:29 |
nik90 | which property are you trying to match it against? | 20:29 |
aNickForMe | nik90: that is what I am getting from another page | 20:29 |
nik90 | aNickForMe: 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 |
aNickForMe | import "components/database.js" as DataBase onClicked:{var q = DataBase.getRowByName("home"); console.log(q) } | 20:31 |
nik90 | aNickForMe: ah okay. That makes sense now. | 20:32 |
aNickForMe | Component.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 |
aNickForMe | that returns YO YO YO YO [object Object][object Object] | 20:33 |
aNickForMe | and not the string | 20:33 |
nik90 | I am sorry but I am not really sure what the issue is with the code | 20:41 |
=== Ursinha-afk is now known as Ursinha | ||
=== Ursinha is now known as Guest43575 | ||
aNickForMe | me either I am looking at the source code for location qml plugin | 20:47 |
aNickForMe | I know why it is retuning the object I just want to figure out how to change it know | 20:48 |
aNickForMe | nik90: you def helped with the string for the query | 20:48 |
aNickForMe | that was the big issue | 20:48 |
nik90 | hmm okay :-).. | 20:48 |
nik90 | I guess you need to access individual properties of the object somehow | 20:48 |
nik90 | so in your case that would be r.somepropertyname | 20:49 |
nik90 | that's what you need to figure out I guess | 20:49 |
=== Guest43575 is now known as Ursinha | ||
=== Ursinha is now known as Guest30084 | ||
aNickForMe | nik90: thanks again. | 21:42 |
aNickForMe | just got done reading the qmlsqldatabase_executeSql function good stuff | 21:43 |
PublicStaticVoid | This is the app development chanel | 21:50 |
PublicStaticVoid | where is the OS development chanel? | 21:50 |
PublicStaticVoid | Channel* | 21:50 |
nik90 | PublicStaticVoid: join #ubuntu-touch | 22:11 |
nik90 | for OS development or any question related to Ubuntu Touch | 22:11 |
ahayzen | nik90, 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-app | 22:11 |
nik90 | ahayzen: thnx mate | 22:12 |
nik90 | ahayzen: I am working on a sample app now to illustrate dyanmic document storage and retrieval stuff | 22:12 |
ahayzen | nik90, playlists is an interesting one. because u can have many playlists and many tracks in each playlist | 22:12 |
ahayzen | nik90, cool :) | 22:13 |
nik90 | I think there you would have one document per playlist | 22:13 |
nik90 | and each document will have the song name, duration as properties | 22:13 |
ahayzen | nik90, yeah either 1 document per playlist or 1 per track in each playlist? | 22:13 |
nik90 | but I am new to this as well. So I would recommend running it by stuart later. | 22:14 |
nik90 | yup both should work | 22:14 |
ahayzen | nik90, i think the former should work but yh i'm new so will have a play :) | 22:14 |
nik90 | exactly | 22:14 |
nik90 | :) | 22:14 |
ahayzen | nik90, 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 |
daker | ahayzen: wait what session ? | 22:16 |
ahayzen | daker, https://plus.google.com/113051860352311525753/posts/UUjKWV3wGyi | 22:17 |
daker | ahayzen: aha! | 22:18 |
ahayzen | daker, :) | 22:18 |
nik90 | ahayzen: regarding the sync part I am not sure. But as mentioned by stuart, sync is pretty much uncharted territory :) so hard to say | 22:21 |
ahayzen | nik90, 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 |
nik90 | ahayzen: yup. Take a look at geldliste, saucybacon, ubuntu tasks (created as part of app developer showdown) | 22:23 |
ahayzen | nik90, cool thanks :) | 22:23 |
nik90 | also word chain | 22:23 |
PublicStaticVoid | nik90: Okay? | 22:24 |
PublicStaticVoid | #ubuntu-touch | 22:24 |
nik90 | PublicStaticVoid: I forgot to ask if you are referring to Ubuntu Touch or Ubuntu development | 22:24 |
nik90 | PublicStaticVoid: for Ubuntu OS development go to #ubuntu-devel I think | 22:24 |
PublicStaticVoid | Ubuntu Touch is for phones.. right? | 22:25 |
nik90 | PublicStaticVoid: well for now yes...eventually tablet, tv :) | 22:25 |
PublicStaticVoid | I installed the package while installing from net install today | 22:26 |
PublicStaticVoid | Thought it was a DE for my touchscreen haha | 22:26 |
PublicStaticVoid | Dunno what it gave me | 22:26 |
nik90 | lol | 22:27 |
PublicStaticVoid | nik90: Is there a beta for touch on touchscreen laptops x86_64 | 23:09 |
nik90 | PublicStaticVoid: Well the shell that you see in Touch called Unity 8 can be run on a laptop. so that's a yes to your question | 23:19 |
nik90 | it is obviously not yet suitable for a desktop yet. but the convergence work is undergoing. | 23:19 |
nik90 | PublicStaticVoid: 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-O3RtQ | 23:21 |
nik90 | sorry that's a huge url. use this one -> http://www.youtube.com/watch?v=K5BKtXpWN1A | 23:22 |
nik90 | PublicStaticVoid: if you are on ubutu 13.10, you can install it using sudo apt-get install unity8 | 23:23 |
nik90 | and then run by "unity8 -mousetouch" | 23:24 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!