**** BEGIN LOGGING AT Wed Sep 05 02:59:59 2012 Sep 05 14:38:39 hi Sep 05 14:39:04 still can't use addComponent properly Sep 05 14:39:49 can someone please check this small sample code? http://jsfiddle.net/spna5/1/ Sep 05 14:44:17 this.addComponent({kind: "B2"}, {owner:this}); this.$.B2.render(); Sep 05 14:44:28 create() not addComponent Sep 05 14:44:29 ** Sep 05 14:44:38 afaik Sep 05 14:44:56 and you shouldn't need the render afterwards, i don't think Sep 05 14:46:03 calarval: http://enyojs.com/api/#enyo.Component::createComponent Sep 05 14:48:24 yes createComponent works but I can't pass an instantiated control to it Sep 05 14:49:00 ah Sep 05 14:49:07 i need to pass an instance because i want to pass something to the constructor Sep 05 14:49:11 * fxspec06 can never get jsfiddle to work Sep 05 14:49:42 i've also never used addComponent. Sep 05 14:50:05 calarval: afaik you can pass anything to the createComponent Sep 05 14:50:35 ok, let me check Sep 05 14:51:04 your B2 kind can override the create and do whatever you want with the passed params Sep 05 14:51:38 ya i think i've done that before. but i can't say for certain Sep 05 14:57:37 createComponent(b2) throws an error Sep 05 14:59:08 calarval: http://jsfiddle.net/spna5/3/ Sep 05 15:01:02 i see, I'll try this approach, thanks Sep 05 15:09:09 there it is! you don't even need the 'content custom label' Sep 05 15:09:27 jesus, the .render() afterwards!!!! rrrix will ove that! Sep 05 15:09:38 jsfiddle causing me fits Sep 05 15:12:07 ha! now i don't even remember way i wanted this in the first place xD Sep 05 15:15:07 s/way/why/ Sep 05 16:29:49 calarval: try addControl, but that's not something you should do often (if I remember my discussion correctly) Sep 05 16:31:02 and probably only works with, you know, enyo.Controls :) Sep 05 16:32:58 sugardave: you know all about scrollers and enyo-fit right? Sep 05 16:33:09 controls vs components is something you could easily miss when starting Sep 05 16:33:36 summatusmentis: no, but I can act like I do, if that helps Sep 05 16:34:44 all I know about enyo-fit is that it sets top,right,bottom,left to 0. So if your container is absolutely positioned (I think I got that right) it will constrain to that box Sep 05 16:35:05 fxspec06: +1 Sep 05 16:35:09 brb guys Sep 05 16:42:51 wait, absolutely positioned... hrm Sep 05 16:42:56 I've never heard that Sep 05 16:44:38 i think i've heard it somewhere. it definitely makes sense.. so wait, that means you could apply .. like .. a relative position, and achieve the same as fit.. ? Sep 05 16:46:36 it's one of those CSS position things. I THINK it's absolute Sep 05 16:47:25 I have _never_ been able to get scrollers to work properly unless I specify a height in px Sep 05 16:47:41 which defeats the purpose, because I need variable height Sep 05 16:48:24 it seems like fittable/enyo-fit breaks when you createComponents after setting something to fit Sep 05 16:48:39 somewhere up the containment hierarchy you need a height, but you should be able to use fit: true on a scroller Sep 05 16:49:19 summatusmentis: you got a fiddle? Sep 05 16:50:24 also, if you're doing interesting things in a fittable, you might need to .reflow() it or call .resized() on it Sep 05 17:13:13 sugardave: this stuff is too embedded to be in a fiddle, unless you want the whole deployed app.js Sep 05 17:26:58 sugardave: thanks, not sure if really need it now. anyway is good to know that. Sep 05 17:49:42 sugardave: I mean, the app as a whole has a height set in index Sep 05 17:53:57 fxspec06: So you got that cool cat's cude working? Sep 05 17:53:58 fxspec06: what was it? Sep 05 17:54:01 He left before I could drag a jsfiddle out of him the other day Sep 05 18:01:09 it was remember the stuff we were doing with fiddle the other night? it wasn't working because you called render() after? well, you do .createComponent().render(); to make it work Sep 05 18:01:55 http://jsfiddle.net/spna5/11/ Sep 05 18:05:46 so you have to render the instance, not the parent Sep 05 18:06:21 it appears as such Sep 05 18:06:34 actually, that B2 doesn't appear for me either :\\ Sep 05 18:08:49 =O Sep 05 18:09:13 no way. it's totally working for me in FF.. Sep 05 18:09:30 and chrome. Sep 05 18:13:18 summatusmentis: is that by design or just what you've done to make it work? Sep 05 18:13:30 and are you just writing in-line or rendering into body? Sep 05 18:15:10 I didn't follow that Sep 05 18:15:21 that's what enyo recommends, for phonegap stuff Sep 05 18:15:40 Sep 05 18:15:58 is that what you mean? Sep 05 18:16:05 otherwise, my top kind is a Fittable Sep 05 18:16:17 oh, I see....I thought you meant the "App" enyo.Control kind was redndering and you were arbitrarily setting its height Sep 05 18:16:45 and that Fittable....do you new App().write() it or .renderInto() ? Sep 05 18:16:52 no no Sep 05 18:17:01 I'm using renderInto(), again because of phonegap Sep 05 18:17:07 most things are rendering just fine Sep 05 18:17:48 are you passing fit: true to the constructor for App? Sep 05 18:18:02 new App({fit: true}),renderInto(document.body); Sep 05 18:18:10 s/,/./ Sep 05 18:18:14 I'm just populating a form based on data from a json server, into drawers, and when the things I want to scroll are Fittables and something is set fit: true, the whole form div collapses to 0 Sep 05 18:19:18 no, I'm not passing fit:true to App Sep 05 18:21:06 so, I think if you do that, you might have better luck with getting scrollers to size correctly as you'd expect. You might need to play around with other fit styles/properties you're currently using Sep 05 18:22:11 so, I _think_ the issue is related to rendering/resizing on the sub-divs where the form elements get populated Sep 05 18:22:43 does render() or resized() propagate down the tree? Sep 05 18:23:53 render for sure...I think resized just calculates the sizes of children and adjusts accordingly Sep 05 18:42:09 render() can mess everything up down the tree if you're not careful. i've never had any issues w/ reflow() though Sep 05 18:42:38 mess up? how? Sep 05 18:43:22 well, err, you really don't wanna know. i had this one control that called render on a container higher up on resize, and that caused a major .. err .. bad thing. this one time. Sep 05 18:43:42 seems legit Sep 05 18:43:42 long long time ago though, not like this weekend or anything Sep 05 18:44:26 porn popped up everywhere Sep 05 18:44:31 actually, sometimes calling .render() on a List can have unexpected results Sep 05 18:44:34 that's the only assumption I can make based on your vageness Sep 05 18:44:41 s/vageness/vagueness/ Sep 05 18:46:13 it acted like an infinite loop but it was worse. my point is, be careful where you stick .render(), and try to use it sparingly Sep 05 18:48:17 sugardave: resized() isn't documented in the enyo API docs Sep 05 18:49:02 that is a shame Sep 05 18:50:24 ok, so, my Scroller is in a Fittable, and has fit: true set. I'm adding components to the Scroller, but height is still 0 Sep 05 18:50:32 is that even the right structure? Sep 05 18:50:54 generally, yes Sep 05 18:51:22 so long as the fittable is fitting Sep 05 18:51:25 let me enter a few of these expenses and I'll throw up a simple fiddle Sep 05 18:51:31 sure Sep 05 19:15:37 summatusmentis: I can't seem to make it do what I want in a fiddle. It also ignores things like enyo-unselectable, so not sure if there's something else going on Sep 05 19:15:46 summatusmentis: that's what happens when you createComponents({kind: "PornPopper"}); :\ Sep 05 19:15:51 It goes everywhere Sep 05 19:15:56 lol Sep 05 19:16:11 * rrix yells at firefox's seeming disability to use rough geolocation to any use Sep 05 19:16:39 I am not at all close to switzerland Sep 05 19:17:25 you're just thinking on too granular a scale Sep 05 19:17:58 :) Sep 05 20:45:40 If I'm setting onEventName to a enyo.bound function, and then calling doEventName, under what circumstances would that bound function not be called? Sep 05 21:07:20 Eh, I have to make it a string referencing the function name if I do that :\ ugh Sep 05 21:09:34 enyo.bound? Sep 05 21:12:37 presumably a function bound using enyo.bind Sep 05 21:44:39 I'm seeing some really weird behavior. Things are all collapsed, until I resize the window, and then things seem to jump to where I actually want them. Sep 05 21:45:48 it's like the fittable stuff is kicking in when the chrome window resizes Sep 05 21:48:57 .reflow() Sep 05 21:49:10 should fix that.* Sep 05 21:49:57 doesn't seem to Sep 05 21:50:37 is it this.$.reflow()? or this.reflow() ? Sep 05 21:50:52 this.reflow() Sep 05 21:51:05 you can call it on specific elements, though Sep 05 21:51:07 yeah, that doesn't work Sep 05 21:52:58 and I don't know which fittable is jumping it's size Sep 05 21:54:17 i'm trying to remember how i fixed that. you could set up a render handler and call reflow there Sep 05 21:54:55 I'm adding components after rendered() gets called Sep 05 21:57:35 actually, that's not true Sep 05 22:04:13 that could happen if there's nothing in the scroller when it's first rendered Sep 05 22:08:39 which is true Sep 05 22:09:01 so I need to render the scroller afterwards? Sep 05 22:10:09 that might help Sep 05 22:17:42 well, wait, the scroller is only inside a drawer, I think Sep 05 22:23:20 well that complicates everything **** ENDING LOGGING AT Thu Sep 06 02:59:58 2012