**** BEGIN LOGGING AT Fri Aug 10 02:59:59 2012 Aug 10 03:53:07 my deploy is horribly wrong. according to bootplate's /tools/README.md, "the CSS url paths are fixed up," but all my CSS URL paths look like url(../../../../../../home/jaredj/n/sparsam/lib/onyx/images/spinner-light.gif) Aug 10 03:56:22 my source is at https://github.com/jaredjennings/sparsam if anyone wants to look Aug 10 04:05:53 actually heck with my application. i cloned the bootplate, cd'd into tools and ran ./deploy.sh, and it wrote the absolute path where I built into the build files. how do i get it to stop that, or write a different path? Aug 10 04:47:05 i'm back Aug 10 04:47:08 * fxspec06 is back Aug 10 04:47:28 I see Aug 10 04:47:30 * ch3mical sees Aug 10 04:47:30 full force. well, kinda. no school for .. about 3-4 weeks Aug 10 05:06:46 When I have components that have a relational data dependant on who their parent is, what is the best way to manage the data, should I set a variable (object) on the component itself, containing that component's data, or would it be better to have a "global" variable (set on the highest ancestor of the relationship) which is simply an object literal containing all possible data for every possible relation and just reference the data based on Aug 10 05:06:55 Not sure that makes any damn sense at all Aug 10 05:08:54 For instance I have a list of items that when clicked will load a new component with data specific to the item clicked, should that component carry its own data with it, or just reference its data from the parent? Aug 10 05:09:27 If a different item in the list is clicked, the child component is reused just filled with a different dataset Aug 10 05:11:06 There will ultimately be 3, possibly 4 tiers handled in this way Aug 10 06:32:32 I can't seem to get enyo.Signals to work Aug 10 06:33:23 I have in my component a { kind: 'Signals', onMyEvent: 'eventHandler' }, and I'm calling enyo.Signals.send('myEvent') and nothing is happening Aug 10 06:33:47 What am I missing? Aug 10 06:35:27 it's gotta be ...send("onMyEvent"); Aug 10 06:36:34 Ohhh right... it even said that in the wiki but I forgot about it Aug 10 06:36:36 Thanks :) Aug 10 06:36:40 np Aug 10 06:36:59 There we go Aug 10 06:37:07 derp Aug 10 07:08:25 How do I get any information about what sent a signal? Aug 10 07:09:02 Events have an originator property Aug 10 07:09:07 But Signals don't Aug 10 07:09:49 The event object when a signal handler is called is just the object of the signal component Aug 10 07:10:05 There's no way to trace it back as far as I can tell Aug 10 07:12:58 Ah, hang on. There's another param being passed that isn't noted in the wiki Aug 10 07:14:01 So the second param is an inSender object Aug 10 14:04:54 hi all, the events declared in a parent class can be triggered from a child one? Aug 10 14:05:10 see this snippet http://dpaste.de/SkyQp/ Aug 10 14:05:44 kind A declares the events hash, and B triggers the doCustomEvent ontap Aug 10 14:39:17 uhm Aug 10 14:39:35 that's not how it works Aug 10 14:40:00 for that to work you want waterfall() Aug 10 14:41:04 doEvent() works backwards, and the event name must be declared in onCustomEvent in both the kind itself and the parent kind Aug 10 14:41:18 the custom events move outwards Aug 10 14:41:24 not inwards. Aug 10 14:55:41 fxspec06: i understand the concept, but i thought that since A is declaring a custom event, and B is a child of A, B shouldn't have to redeclare the events hash Aug 10 14:56:10 oh i see that Aug 10 14:56:27 i missed that part. you're right except it's missing the key part Aug 10 14:56:49 it has to actually inherit the properties of that object Aug 10 14:57:06 to do this put a create: function with this.inherited(arguments); Aug 10 14:59:40 fxspec06: ok, let me try Aug 10 15:23:09 fxspec06: no luck with your suggestion ... Aug 10 15:23:53 https://github.com/enyojs/enyo/blob/master/source/kernel/Component.js#L88 Aug 10 15:24:24 the importProps seems to copy the handlers, but not the events hash? Aug 10 21:18:03 How do you associate a "label" with an onyx checkbox/ Aug 10 21:18:03 ? Aug 10 21:19:27 I have a form using Groupbox, if I just put a { content: 'my text' } after the checkbox as a label it gets put on another line Aug 10 21:22:05 Just have to use CSS I guess Aug 10 21:24:41 therealklanni: how about {kind: enyo.Checkbox, content: "the label"} ? Aug 10 21:25:03 It ends up on top of the checkbox Aug 10 21:25:09 Overlayed Aug 10 21:25:33 I just did it in the core playground of the sampler app Aug 10 21:25:37 Also I'm using onyx.Checkbox, if that makes a difference Aug 10 21:25:43 ah, probably Aug 10 21:27:10 you could try to align them with a Fittable wrapper Aug 10 21:28:47 bah, no Aug 10 21:31:33 Seems like something that should just be built-in, right? Aug 10 21:32:43 well, it's somewhat working (it's in the DOM and in the right location) Aug 10 21:32:58 if you set a height on it, it will lay out in a FittableColumns and show Aug 10 21:43:51 So what did you do Aug 10 21:44:19 FittableColumns with those two components and set hight on what? Aug 10 21:46:33 therealklanni: set height on the checkbox Aug 10 21:46:54 to 32px (that's the css image height) Aug 10 21:47:14 Thanks I'll give it a try Aug 10 21:49:04 Works much better than trying to position it with CSS. It was causing the checkbox to be unclickable Aug 10 21:51:14 What's the easiest way to center things in Enyo? Or should I just use CSS Aug 10 21:51:37 I want to center my form in the page on both axis if possible Aug 10 21:51:55 if you're using a FittableColumns, put class "enyo-center" on it (but only works for Columns) Aug 10 21:52:00 ok Aug 10 21:52:18 for vertical, you're pretty much on your own right now Aug 10 21:52:22 Got it Aug 10 21:52:26 Thanks Aug 10 21:52:29 np Aug 10 21:54:48 Do you have anything you can point me to for enyo.WebService? Aug 10 21:55:00 I'm interested in seeing how it works but can't find anything Aug 10 21:55:40 I am developing an app that depends on a RESTful API Aug 10 21:56:13 So I was wondering if enyo.WebService would be a good way to organize all those API calls, etc Aug 10 21:57:30 For now I've just been putting them in the kind that uses them, but it seems like keeping them all in one place would make more sense. Aug 10 21:58:01 i've just moved all my Ajaxes to one .js file Aug 10 21:58:27 therealklanni: beyond the API docs? have you looked at enyo.Ajax? Aug 10 21:58:28 https://github.com/jaredjennings/sparsam/commit/b58facfbe19f0243d5fdb44d91edbabe7263cfc6 Aug 10 21:58:35 jaredj: but how are you managing them, are they kinds with Signals? Just calling them like regular functions? Aug 10 21:59:21 sugardave: that's just enyo.Ajax though, I'm trying to see how enyo.WebService works. I know it uses enyo.Ajax, but how? It has a .send method, but I'm not sure how it gets setup or the proper way to call it Aug 10 21:59:23 they are kinds that inherit from enyo.Ajax. i didn't play around with the methods at all Aug 10 21:59:26 There doesn't seem to be any docs Aug 10 21:59:45 therealklanni: did you ever do Enyo 1 apps? Aug 10 21:59:50 No Aug 10 21:59:52 ah Aug 10 21:59:54 okay Aug 10 21:59:56 :) Aug 10 22:00:10 I've just started learning it this month Aug 10 22:00:16 Week 2 now Aug 10 22:00:47 so {kind: enyo.WebService, url: "http://example.com", onResponse: "responseHandler", onError: "errorHandler"} Aug 10 22:00:50 okay? Aug 10 22:01:04 then in some other code: this.$.webService.send(); Aug 10 22:01:06 http://therealklanni.github.com/kanbanana is a demo of my application. It's just using static JSON files for the demo, but you can check out the fully functional version if you clone the repo Aug 10 22:01:40 if you want to pass query parms: this.$.webService.send({param: value, param2: value2}); Aug 10 22:02:13 sugardave: figured it would be pretty simple :) Aug 10 22:02:24 yep yep Aug 10 22:02:26 "this.$.webService.send()": that means it goes in the components: [...] right? Aug 10 22:02:58 jaredj: that assumes the context this is "owns" the WebService kind Aug 10 22:03:02 so, more or less Aug 10 22:03:08 I'm thinking of using Signals to call the methods though Aug 10 22:03:17 you could do that Aug 10 22:03:40 signals, hmm Aug 10 22:03:50 you could also just pass a reference to the top-level WebService to any kinds that need it Aug 10 22:04:34 Yeah, the only problem is that some of the things that need them are several levels deep Aug 10 22:04:37 Could get hairy Aug 10 22:05:05 I dunno. I haven't gotten the hang of Event Handling yet, other than Signals Aug 10 22:05:19 The wiki on it is a bit sparse Aug 10 22:05:34 events can get overwhelming if you don't do a little planning Aug 10 22:05:36 i found http://enyojs.com/docs/events.html the most helpful Aug 10 22:05:48 it's basically like this: Aug 10 22:05:59 (er, that isn't the wiki is it) Aug 10 22:06:30 your kind defines an events object: events: {sugarDavesEvent: ""} Aug 10 22:07:02 Yeah that part was the most confusing to me. You just definte a null property? Aug 10 22:07:05 (oops, that wasn't the helpful page) Aug 10 22:07:32 now wherever I include the kind that has that event: components: [{kind: thatKind, onSugarDavesEvent: "theHandler"}] Aug 10 22:07:40 right? Aug 10 22:08:03 so "theHandler" is defined where the containing kind is declared Aug 10 22:08:26 in otherw words, you don't put "theHandler" as a function of the kind that makes the event Aug 10 22:09:08 also, anything up the ownership tree can listen for that event Aug 10 22:09:45 kind A -> kind B -> kind C kind A can get events from kind C without needing to use Signals Aug 10 22:10:50 when I want to send an event from the kind that defines it, I just do: this.doSugarDavesEvent({someEventData: "foo"}); Aug 10 22:12:31 what if you want to send an event from a response handler? Aug 10 22:13:04 like a new event or the same one? Aug 10 22:13:25 a new event Aug 10 22:13:36 from a reponse handler for an ajax Aug 10 22:14:19 i tried to send one and it didn't seem to work. but stepping through event handlers in chromium's JS debugger is sometimes ... wacky Aug 10 22:14:26 so, ideally you would want to define that event in the kind where the response handler is Aug 10 22:14:38 uh huh Aug 10 22:14:50 OK, so kind A has the events:{myEvent:''} and kind C can have onMyEvent trigger something? the handler would be in Kind C? Aug 10 22:14:50 and you could just do this.doThatEvent(); Aug 10 22:15:02 ok Aug 10 22:15:22 therealklanni: that's backwards (in my head kind A owns kind B owns kind C) Aug 10 22:15:39 kind C defines the event: onMyEvent: "" Aug 10 22:15:41 Yeah that's how I'm imagining it Aug 10 22:15:55 then the handler could be in kind A Aug 10 22:15:58 kind a contains kind B and sets onMyEvent: "kindAHandler" Aug 10 22:16:00 ok Aug 10 22:16:21 and kind B owns kind C and can either put a handler for onMyEvent or not Aug 10 22:16:23 Can Kind B also trigger the event? Aug 10 22:16:39 Or does it need its own handler? Aug 10 22:17:03 either by adding it to the events object OR you can do enyo.bubble("onMyEvent", {eventData}); Aug 10 22:17:36 (I don't think bubble is protected/private) Aug 10 22:17:43 Any chance you can do a jsFiddle so I can see what you mean? lol Aug 10 22:17:56 therealklanni: sure, give me a few minutes Aug 10 22:17:57 It's a lot to try to imagine if you've never done it Aug 10 22:18:02 Thanks, lol Aug 10 22:27:56 Anybody want to document one published property for me? Aug 10 22:29:36 What's in it for me? ;p Aug 10 22:44:40 therealklanni: these are equivalent: Aug 10 22:44:49 http://jsfiddle.net/espya/1/ http://jsfiddle.net/dFPQ7/1/ Aug 10 22:46:31 Ah ok Aug 10 22:47:33 Much clearer now, thanks Aug 10 22:47:39 np Aug 10 22:48:47 So putting it in handlers versus in the kind declaration are no different? Aug 10 22:49:14 not in that case Aug 10 22:49:29 ok Aug 10 22:49:30 handlers are what you want to use for Signals and other DOM events you want to do stuff with Aug 10 22:49:52 but it works this way, too, obviously Aug 10 22:51:35 so, yeah, you could have a WebService there in kindA and use events like onWebRequest propagated from the lower kinds Aug 10 22:51:55 the trick will be passing references to the response or error functions you want to run with the data **** ENDING LOGGING AT Sat Aug 11 02:59:58 2012