**** BEGIN LOGGING AT Thu Nov 08 03:00:02 2012 Nov 08 19:10:53 can you change a toggle from on/off to something else? like, yes/no? Nov 08 19:11:22 I think so, yeah Nov 08 19:11:49 any ideas where that may be documented? Nov 08 19:11:54 lemme look at the docs quick Nov 08 19:12:21 http://enyojs.com/api/#onyx.ToggleButton onContent and offContent Nov 08 19:12:30 thanks Nov 08 19:12:44 sure thing Nov 08 21:46:53 so there is no way to insert into index0 of components? Nov 08 21:47:24 i wanted a simple kind that would basically just put its components into a drawer but i dont want the components baked into the kind Nov 08 21:56:44 you mean, create component before others? Nov 08 21:57:25 i have always wondered this myself, let me wonder Nov 08 21:58:02 i think you might have to look at the code for createComponent Nov 08 21:59:01 i know enyo has properties for components / controls, i.e. name.children[int] .. but i am 99% sure these are NOT directly accessible Nov 08 21:59:59 well i have a kind, lets say all it does is open an alert on tap Nov 08 22:00:13 also name.controls and name.getComponents() are also arrays, but also pretty sure they are not directly accessible. BUT. you can .pop() from a panels.getPanels() to destroy it, so they must be somewhat interactive Nov 08 22:00:16 and then i use it over and over and in the app i list the different components Nov 08 22:00:27 so i dont want those components baked into it Nov 08 22:01:19 basically i want the kind thats used for the container to internally inject 1 kind first so it will create a header Nov 08 22:01:50 and then use a tap event in that to trigger the height to collapse Nov 08 22:02:01 eg drawer Nov 08 22:02:31 i guess i can just create an array and pass the kinds in to THAT Nov 08 22:02:51 and do create components and create them myself internaly vs overloading components prperty itself Nov 08 22:04:27 you COULD TRY this: Nov 08 22:04:40 enyo has a removeComponent and an addComponent function. i've never done this Nov 08 22:04:59 you could remove all components from your container and store them temporarily..... then add your header, then add them back Nov 08 22:05:12 nope, removeComponent doesn't return anything. nvm. Nov 08 22:06:00 heh Nov 08 22:06:08 i can just make my own array for them Nov 08 22:06:11 thats clean Nov 08 22:06:22 there's a way, there's definitely got to be a way Nov 08 22:06:33 its just nicer to have it automatic Nov 08 22:06:40 you COULD rewrite the source and upload it to github, and get an enyo patch ;) Nov 08 22:06:52 so you could have any kind that would be enyo.Control you switch to this and it gets an injected header Nov 08 22:07:25 but the stuff that was closest to this functionality was removed. makes me wonder why Nov 08 22:07:26 well for that you could always extend enyo.Control Nov 08 22:07:48 but i can't believe there's no way to insert a component at a specific index Nov 08 22:07:55 well yea enyoControl should allow internal and externally set components to co exist Nov 08 22:08:08 seems like a weird limitation Nov 08 22:09:34 it is Nov 08 22:11:44 drunknbass: I can't help but think you're doing this wrong. Nov 08 22:12:07 well yeah, there's definitely another way to do it, but it still doesn't fix the limitation Nov 08 22:12:15 Is what you're trying to do have a component that creates a header around passed-in components? Nov 08 22:12:19 yea i probably am Nov 08 22:12:26 you probably should be using a list Nov 08 22:12:29 repeater Nov 08 22:12:30 maybe components are being replaced by the ones i pass in. Nov 08 22:12:31 **** Nov 08 22:12:33 going to check Nov 08 22:12:49 you can def rearrange repeaters. but still.. Nov 08 22:13:19 Roy__ essentially yes. i had a table light mess i needed to make into a collapsable row Nov 08 22:13:23 easy way to get that Nov 08 22:14:03 I have an component that does that. Nov 08 22:14:09 yeah there's absolutely no references to changing indicies for components in the source Nov 08 22:14:31 if its just an array you could just manipulate it and re draw? Nov 08 22:14:51 You don't need to do that. Just set the control target by having a 'client' property that points to the kind to place the controls in. Nov 08 22:15:21 i dont follow? Nov 08 22:15:53 youre saying pass the header kind in to each instance instead of bake it into the kind? Nov 08 22:16:30 you could make a master kind for your mini kinds, and in that, have a header, have your collapsable drawer, and custom functions, and then put all that in a repeater and add / remove as necessary... Nov 08 22:16:41 thats what i wanted to do Nov 08 22:16:48 it'd be cleaner, more efficient, less code Nov 08 22:17:16 and i added the header in the components array but it seems to use it vs the ones passed in. so my issue might simple be that Nov 08 22:17:32 eg, not replace the components array but add to it Nov 08 22:17:32 drunknbass: Something like this? Nov 08 22:17:33 https://github.com/webOS101/Facelift/blob/master/Facelift/source/CollapsingGroup.js Nov 08 22:17:34 you don't add to the components array Nov 08 22:17:37 you do Nov 08 22:17:59 .createComponent({ ... }, {owner: this}); Nov 08 22:18:15 kinda yea Nov 08 22:18:39 but then any components passed in would end up in Facelift.CollapsingGroup.$.Drawer Nov 08 22:18:45 but that always adds to the end of the components array, so if you need to add it to a specific spot, make sure you put whatever comes AFTER in its own special container Nov 08 22:18:49 not replace the ones defined in the kind Nov 08 22:19:07 You want to replace the header -and- pass in the contents of the drawer? Nov 08 22:19:26 so you put your {name: "header"}, {components: [ ... /* your drawer */ ]} Nov 08 22:20:34 I'm definitely confused about what you want. I don't think I've paid enough attention or read enough scrollbac. Nov 08 22:20:39 yea i know Nov 08 22:20:49 it sounds like an issue by the way im attacking it Nov 08 22:21:07 Do you have a picture of what you're trying to do? Nov 08 22:21:13 i guessit comes down to can you have a kind which inside sets components array Nov 08 22:21:23 Gotta use small words so I can understand. :) Nov 08 22:21:30 and then set components array where you add that kind to the app and have them both combine Nov 08 22:21:32 vs one or the other Nov 08 22:21:37 i think, maybe you have not enough experience w/ enyo maybe to know what you CAN do and how to achieve Nov 08 22:21:47 i think the answer is yes and i just wasnt doing it myself Nov 08 22:21:59 and essentially i was just replacing my components array entirely Nov 08 22:22:27 There are some examples of overriding the createComponents call. Nov 08 22:22:34 I don't recommend it. Nov 08 22:22:39 you can't do that. you can create an object that holds the components you WANT to insert into the app Nov 08 22:22:50 fxspec06 exactly Nov 08 22:23:04 if i just create my own property and then use it in create id get the same result Nov 08 22:23:21 its just not a plug and play replacement to automate wrapping it all up Nov 08 22:23:21 var x = new enyo.Component(); x.createComponents([]); Nov 08 22:23:23 then Nov 08 22:23:24 but i dont even care Nov 08 22:23:39 push them all Nov 08 22:23:43 this.$.whereitsgoing.addComponent(x); Nov 08 22:24:02 yup Nov 08 22:24:08 there's multiple ways of doing it, but you *need* to use enyo functions. you never should manipulate the arrays yourself Nov 08 22:24:17 if you want / try to do that way.. you're doing it wrong! Nov 08 22:24:21 yea i was trying to make it as transparant Nov 08 22:24:30 transparent* Nov 08 22:24:32 i know, looks cooler your way, but bad Nov 08 22:24:38 haha yea Nov 08 22:24:58 i would advise you make your own helper kind to manage what you need to do Nov 08 22:26:46 you do realize, you can nest on .createComponent? Nov 08 22:27:00 yea thats what im doing Nov 08 22:27:07 i was just looking at the whole thing wrong Nov 08 22:27:09 and stuff inside is all strings, you could go as deep as you want and do it all dynamically Nov 08 22:27:12 its actually a simple problem Nov 08 22:27:28 well, it is, but the roots go deeper Nov 08 22:27:53 basically i wanted to have the easiest way to put a bunch of stuff into a drawer without editing anything Nov 08 22:27:59 just change the kind and it was done Nov 08 22:28:00 :P Nov 08 22:28:04 enyo gives you multiple ways to tackle problems, and to find the best you really kinda needa digg into the source and try many things Nov 08 22:28:59 what works now may have limitations later, and rewriting later could bring problems everywhere making delays, rewrites, inefficiency etc. ran into that one a few times Nov 08 22:29:49 oh yea im trying to cut corner right now Nov 08 22:29:52 loool Nov 08 22:29:57 geter done Nov 08 22:30:06 cutting corners is great, so long as it works Nov 08 22:30:35 haha yea. thats the price when stuff is late Nov 08 22:30:48 a lot of the time the longer way is the only way. man i have this kind in neo, that does FAR too much than it should, and it is the base of all my glitches Nov 08 22:30:52 its actually a ipad app that is for hospitals and i use enyo to create the interactive form Nov 08 22:31:09 You keep saying 'place stuff in drawers' but it's more than that, right? Nov 08 22:31:16 I still have no clue. Nov 08 22:31:17 then extract the data elements and pass back into native app to process Nov 08 22:31:35 i had to change it like a week after school started and time was limited, and after i changed it i had to change like 3 other huge things... and it broke so many other things. but i had to release it because it was time Nov 08 22:31:37 Roy__ its ok im just reworking the kind Nov 08 22:31:43 i think i got a handle on it Nov 08 22:32:20 if i had thought it out a little more i'd have done it that way from the start (breaking it down) and wouldn't have ran into that issue.. basically, i ended up having to fix the same problem a thousand times Nov 08 22:32:53 blah. i think i will end there Nov 08 22:33:19 well yea, the form itself will need to be reworked anyway Nov 08 22:33:35 there is so much data and stuff thats baked in now that i didnt know was dynamic Nov 08 22:33:54 ill have to create some more generic form engine and some schema for designing its layout Nov 08 22:34:42 i'm really just beginning to learn advanced coding techniques, and starting to understand how to write great code. but it's borderline because the more i know, the cockier i get, and the more i think i can manage, so i shoot bigger... but i haven't quite yet got a grasp on how to break things down and maximize efficiency Nov 08 22:35:00 i can make things happen, just poorly. breaking it down is probably the hardest part Nov 08 22:35:12 i think when in doubt, make another kind is probably best advice Nov 08 22:35:48 yea Nov 08 22:36:16 every language has different quirks to maximize efficiency Nov 08 22:36:17 but then, ensuring that each kind is efficient is important, because you don't want one thing doing many things all the time. inheritance is great but can be devastating at same time Nov 08 22:36:33 thats why i like enyo. its just layed out in a way that feels less restrictive to me Nov 08 22:37:44 i said some very cool things about enyo to an hp rep once, short version is it's its own engine Nov 08 22:38:10 it's like a game engine, similar to unreal or cryengine Nov 08 22:38:30 super powerful, easy to get into, attractive, expandable Nov 08 22:38:56 but also takes time to master Nov 08 22:43:17 * fxspec06 bbl **** ENDING LOGGING AT Fri Nov 09 02:59:58 2012