**** BEGIN LOGGING AT Mon Apr 09 02:59:58 2012 Apr 09 03:50:50 summatusmentis: localStorage.thing = "something"; Apr 09 03:54:03 summatusmentis: i believe there is a localstorage thing in the enyojs galary Apr 09 04:03:06 wait, just to clarify, localStorage is the same thing as sqlite right? Apr 09 04:06:22 that i have no clue.. sorry Apr 09 04:07:00 I am tempted to say no. But I never had had a need for localstorage Apr 09 04:08:16 I need to get back into enyo. I want my cloudfoundry app dammit. Apr 09 04:19:50 is the create function a 'constructor'? Apr 09 04:20:08 there's no docs on "how do I do basic programming things in enyo" Apr 09 04:43:42 no localStorage is not the same as sqlite Apr 09 04:44:04 and create is close enough to a constructor for most intents and purposes Apr 09 04:47:16 ok, so if I want to make a sqlite table (or 2) "on load", and have it persist across times the app is loaded, does the table creation/db setup happen in create()? Apr 09 04:48:20 that sounds like a good course of action Apr 09 04:52:42 and then writing to the DB happens in the onclick method of the Button element, and reading from the DB happens in an... onLoad of a FittableRows component? Apr 09 15:08:52 * phil_bw wanders by Apr 09 18:10:07 how does one populate a Repeater? Apr 09 18:25:49 repeater.rows = 3; repeater.items = ["one","two","three"]; Apr 09 18:25:53 i think Apr 09 18:27:23 suppose I want to have a Repeater kind setup, but I want to populate afterwards? Apr 09 18:27:51 1 sec Apr 09 18:28:32 kind: "Repeater", onSetupRow: "load", Apr 09 18:29:00 so I don't need to define the size to start with? Apr 09 18:29:04 load: function(inSender, inEvent){ Apr 09 18:29:04 var index = inEvent.index; Apr 09 18:29:04 var _row = inEvent.row; Apr 09 18:29:13 then Apr 09 18:29:25 this.$.repeater.setRows(this.yard.length); Apr 09 18:29:25 this.$.repeater.build(); Apr 09 18:29:25 this.$.repeater.render(); Apr 09 18:29:56 no, you don't Apr 09 18:29:59 what is inEvent? Apr 09 18:30:16 it's the second param that's passed from onsetuprow Apr 09 18:30:46 I mean, fine, but what does that mean? Apr 09 18:31:05 I know what a parameter is, but why can you say inEvent.index and inEvent.row? Apr 09 18:31:39 because it's an enyo event Apr 09 18:32:14 enyo sets those properties. they're not really documented Apr 09 18:32:21 you kinda gotta log to see them. that's the only way i know Apr 09 18:33:12 I wish the enyo documentation was better Apr 09 18:33:23 nothing tells me what anything is beyond "it's this thing, use it" Apr 09 18:33:42 it's extremely similar to enyo 1 Apr 09 18:33:54 and the 2.0 docs aren't exactly complete Apr 09 18:34:51 that would require knowing enyo1 Apr 09 18:34:58 enyo1 wasn't terribly clear either Apr 09 18:35:40 this is true Apr 09 18:36:23 the whole thing is "hey look! stuff!" Apr 09 18:36:36 and it feels like you're just expected to know what to do with it Apr 09 18:38:22 it's a work in progress Apr 09 18:39:12 and while it does need some work, i think if you invest some time with it things will eventually become clearer Apr 09 18:39:32 well, sure Apr 09 18:44:48 fxspec06_: so, in your example above, where does the population of the row actually occur? Apr 09 18:45:46 it occurrs in render() in the load event Apr 09 18:46:09 but suppose I want each row to be an entry from a DB? Apr 09 18:46:16 how do I set the value? Apr 09 18:46:52 you have an item in your list, and as components of that item you can put as many things as you want Apr 09 18:47:50 so if you have inside your item, a component with the name 'title' you can do _row.$.title.setContent("some string"); Apr 09 18:48:25 so load gets called multiple times? Apr 09 18:48:29 yes Apr 09 18:48:31 or just once? where's the loop? Apr 09 18:48:41 it gets called as many times as there are rows Apr 09 18:49:07 build(); render(); calls it Apr 09 18:50:47 ooooh, I see, the setRows(), build(), render() sequence happens in a different function than the actual content setup? Apr 09 18:51:09 because otherwise the setRowns(), build(), render() sequence gets called every time? Apr 09 18:51:12 yes, exactly. so like in create you could call that, or make it its own function Apr 09 18:51:20 got it Apr 09 18:51:50 the setRows() build() and render() never gets called by enyo itself.. build and render happen once when it's loaded Apr 09 18:52:23 you can set rows in the declaration if you like, too Apr 09 18:52:51 well, I don't know how many rows there are Apr 09 18:53:55 i had to experiment and find build() render() myself. it'd definitely not anywhere in the docs, and that's not how you do in enyo 1 Apr 09 20:22:52 Guh, having to comma at the end of all my methods is just strange Apr 09 20:26:53 fxspec06_: are you sure the method is setRows()? Apr 09 20:29:20 absolutely Apr 09 20:30:01 hrm Apr 09 20:31:36 soo bad at staying focused on homework Apr 09 20:31:41 are you trying to setRows() on the repeater object? Apr 09 20:32:00 or rather what error is it throwing Apr 09 20:32:50 fxspec06_: yes, the error is "TypeError: 'undefined' is not an object (evaluating 'this.children.length')" (from Safari's Web Inspector) Apr 09 20:33:02 on enyo.js:1207 Apr 09 20:33:54 which doesn't point to the problem, so I'm working backwards Apr 09 20:36:18 which is in a generateInnerHtml class Apr 09 20:36:36 {name: "repeater", kind: "Repeater"} followed by this.$.repeater.setRows(1); shouldn't return an error Apr 09 20:37:00 unless the repeater was still being generated when the setRows() was called Apr 09 20:37:25 which is possible because i've run into problems with that. pretty sure it's a glitch Apr 09 20:40:06 I have no idea what the error is, I'm not certain it's the repeater Apr 09 20:41:55 I wish the Web Inspector would give me a backtrace Apr 09 20:44:14 it sounds like it's coming from some kind of dynamic element. but i'm not sure Apr 09 20:44:44 honestly, me neither Apr 09 20:45:01 but then I don't know anything about this enyo stuff Apr 09 20:46:19 if you want to paste your code i could take a look Apr 09 20:47:22 did you know there are sample apps in the source? Apr 09 20:47:36 you can look at those for some examples Apr 09 21:06:20 I've looked at some of the sample code Apr 09 22:11:28 is there a way to get a a DATETIME value in enyo? Apr 09 22:33:06 eh. besides te normal javascript object i don't know of a way Apr 09 22:33:24 var date = new Date(); **** ENDING LOGGING AT Tue Apr 10 03:00:00 2012