**** BEGIN LOGGING AT Tue Jan 06 02:59:59 2015 Jan 06 04:26:50 ...pation. Jan 06 16:03:44 hey dmanderson, do you guys use any linters for JS? Jan 06 16:45:00 GodGinrai: We use jshint Jan 06 16:45:17 In fact, the grunt task with Bootplate includes a jshint task. Jan 06 16:45:25 ah, thanks Jan 06 16:46:07 It you used generator-enyo, it's ready to go. If not, just do a 'npm install' on the bootplate directory and then install the grunt cli if you don't have it. Jan 06 16:46:31 generator-enyo? Jan 06 16:49:28 You know, our new Yeoman task for scaffolding Enyo apps? Announced with 2.5.1? Jan 06 16:50:52 ah Jan 06 16:51:18 I heard about that Jan 06 16:51:19 but honestly, I don't even really understand what the hell yeoman is Jan 06 16:51:19 so I haven't looked into it Jan 06 17:36:10 It's a scaffolding tool. Jan 06 17:36:21 You really only need it when making a new Enyo project. Jan 06 17:36:32 Although, it includes tools to update your Enyo version. Jan 06 17:36:39 so it's another bootplate kind of thing? Jan 06 17:36:51 Not exactly, it installs bootplate. Jan 06 17:37:11 I see Jan 06 17:38:22 It builds off a common JavaScript tool (Yeoman). And, by doing that, we can do things like create a full Cordova project, or update Enyo+Libs to a specific version. Jan 06 17:38:37 Or even add new libs on the fly. Jan 06 17:38:48 I see Jan 06 18:07:02 Roy__, did you see my comments ? Jan 06 18:08:36 morning enyoers Jan 06 18:08:47 hi dmanderson Jan 06 18:08:55 Howdy Semanticfire_2! Jan 06 18:10:47 Roy__, I couldn't scafold a project around a minimalistic source tree from a repository Jan 06 18:12:37 morning dmanderson Jan 06 18:12:59 \o Jan 06 18:28:58 Semanticfire_2: What do you mean? Jan 06 18:36:44 Roy__, http://forums.enyojs.com/discussion/2289/yeoman-scafolding#latest Jan 06 18:39:07 I will reply there when I get a chance. Basically, you want a 'not even bootplate' option? Jan 06 18:39:28 OR, are you saying you want those to be submodules? Jan 06 18:39:46 Or something else altogether? Jan 06 18:40:01 what I want is to be able to construct a bootplate around a minimalistic source code repo with enyo application code Jan 06 18:40:25 so I check in source/app.js Jan 06 18:40:49 have some grunt / bower / npm config file which I can run from a checkout of that code Jan 06 18:41:08 and then end up with a tree from which I can test / run / build my enyo app Jan 06 18:41:26 and all the stuff in lib / enyo etc goed in .gitignore / .svnignore Jan 06 18:42:02 so a relativly simple app has like a dozen of file for source code in the repo plus some files which allow me to scaffold all the enyo stuff around it Jan 06 18:42:23 the link in the message basically does that Jan 06 18:42:23 you need npm + bower + grunt installed Jan 06 18:42:42 checkout the code, do a 'grunt setup' and there is your enyo enviroment around the code from the repo Jan 06 18:44:52 That’s why you forked my grunt-enyo-builder right? because it just tosses the enyo stuff in an ignored directory like node-modules Jan 06 18:45:06 Hello Enyos, I was wondering if there is a known issue with scrims not disappearing in 2.5.1 when you hide() a popup. None of my scrims are disappearing, but I can't seem to replicate it in jsfiddle. Jan 06 18:45:07 yup Jan 06 18:45:18 Only used at build time, and not actually part of the project repo Jan 06 18:45:33 exactly Jan 06 18:45:43 all the other options end up cluttering my project repo Jan 06 18:46:34 trex005 I thought there was a z-index problem fixed for 2.5.1 after multiple popup scrims were inserted into the DOM - I’d have to go back and look. Jan 06 18:51:48 Well, I'm trying a bunch of stuff with multiple popups in jsfiddle and that's not replicating it either. :( Jan 06 18:52:16 This worked when I was on 2.4.0, but when I updated to 2.5.1 it just stopped working. Jan 06 19:03:24 I attempted calling showHideScrim(false); directly too, no luck. Jan 06 19:04:01 trex005: you say that it works in the JSFiddle but not in your own code? Jan 06 19:04:09 Correct. Jan 06 19:04:34 are you using the minified 2.5.1? Jan 06 19:04:48 No, I'm using the bootplate 2.5.1 Jan 06 19:05:43 hrm Jan 06 19:06:01 trex005: I would set a breakpoint at hide() and walk through it, then Jan 06 19:06:18 if you are using the bootplate 2.5.1, the code should be unminified, and therefore legible Jan 06 19:19:07 It seems like the popup fires and event when it is closed, is the scrim supposed to be listening for this? Jan 06 19:20:06 I'm not quite following the code on line 83, of ObserverSupport.js Jan 06 19:28:44 trex005: can you check out 2.5.1.1 and see if the problem still exists? Jan 06 19:29:15 Sure, I'm not using git, so it'll take me a few minutes. Jan 06 19:30:56 release-2.5.1-pre.5 ? Jan 06 19:31:31 no, 2.5.1.1 is the tag Jan 06 19:32:00 Found it, thank you Jan 06 19:39:46 Roy__: yes, still exists in 2.5.1.1 Jan 06 19:40:56 in Scrim.js there is a function hideAtZIndex that when called zStack.length is 3, so it never calls hide(). If I manually call hide() it works. Jan 06 19:50:00 So, after I call PopupName.hide(); I can call PopupName.getScrim().hide(); as a workaround, but that seems like a pretty lousy method :) Jan 06 20:04:24 trex005: Agreed. Let me see if this was fixed at some point. Jan 06 20:04:44 Or if it still exists in master. Jan 06 20:07:24 trex005: Are you calling showAtZIndex() or whatever the function is called? Jan 06 20:08:00 No, it is automatically called when I call PopupName.hide(); Jan 06 20:08:50 sorry, not the show version, the hide version. Jan 06 20:11:05 I am not manually calling showAtZIndex anywhere either. Jan 06 20:13:57 Are you able to create a reproduction case? Jan 06 20:14:13 I've tried on jsfiddle to no avail Jan 06 20:15:05 If you'd like access to my app, I can remove the getScrim().hide() codes and get you a link Jan 06 20:16:20 trex005: Is this on Firefox? Jan 06 20:16:53 Chrome, I can test it on FF though Jan 06 20:17:04 no, there was a bug in Firefox at one point related to scrims. Jan 06 20:17:11 I wanted to rule that out. Jan 06 20:18:03 Well, I tested it anyway, same bug on FF Jan 06 20:18:53 trex005: Yes, let me take a look. Jan 06 20:19:17 Maybe I can figure out how to fix it before we push out 2.5.1.1. I'll double-check the sampler. Jan 06 20:19:37 https://game.imagefaceoff.com/enyotesters When you first go to the app, it'll ask you "How you want to be known" that is the first issue of it happening. Jan 06 20:22:30 I didn't see that 'how do you want to be known? Jan 06 20:22:36 lemme try again. Jan 06 20:22:51 It dismissed when I switched tabs I guess? Jan 06 20:23:10 That's okay, there are other popups you can trigger. on the left hand side there is an angel with a +, you can click on that and close it Jan 06 20:24:07 Odd that you didn't get that popup though, I'll have to see if I can reproduce that :) Jan 06 20:26:25 I got the popup and the scrim stuck around. You could always work around it by binding the popup and scrim's showing properties Jan 06 20:28:54 If you use the add angel button, you can add the breakpoint on line 319 of FullScreen.js Jan 06 20:29:23 I don't mind using the getScrim().hide() workaround for now Jan 06 20:30:08 I propose you make a kind that is trex005.ScrimmedPopup or something Jan 06 20:30:26 I'm new to Enyo, I've defined a Component that defines two Events and attempts to connect them to a WebSocket's onerror and onmessage callbacks in the component's create function (code: https://gist.github.com/hunternet93/7746d1cbafe37e6d3c1c). It seems that this.do() isn't created until after create() is called? What should I do instead? Jan 06 20:31:25 I can do that. I wanted to make something like that anyway, I just didn't know how to nest the components properly. Jan 06 20:32:21 trex005: Enyo thinks you have a popup open. Jan 06 20:32:41 I wonder if there's a hidden popup somewhere. Jan 06 20:32:48 hunternet93: use camelCase. onError, doError Jan 06 20:33:31 or if somehow I'm triggering whatever method counts the popups twice Jan 06 20:33:38 GodGinrai: hmm, I still get the same error, onError isn't a function Jan 06 20:34:10 hunternet93: yea, that was just a suggestion to make your code more readable (and match Enyo style) Jan 06 20:34:42 GodGinrai: Oh. well, looks like it's a namespace issue, i'm a javascript noob. Jan 06 20:34:43 enyo kind events MUST be onUpperCase Jan 06 20:35:33 hunternet93: yea, you needed to bind this, right? Jan 06 20:35:34 hunternet93: This during the socket is not 'this' the chat connection. Jan 06 20:35:36 You need to bind Jan 06 20:35:42 'this' during... Jan 06 20:36:00 hunternet93: use enyo.bind Jan 06 20:36:15 or now that I think of it, components now have their own bindSafely method, don't they? Jan 06 20:36:26 yes Jan 06 20:36:30 Roy__: I think i got it now, actually. the anonymous function was unneccessary. Jan 06 20:38:25 Roy__: stupid question, when I override a function in my new kind, how do I call the overridden function? Jan 06 20:38:29 Indeed. Jan 06 20:38:44 trex005: this.inherited(arguments) Jan 06 20:38:51 thank you. Jan 06 20:39:45 trex005: Can you temporarily add a 'this.log(this.name, this.showing)' to onyx.Popup's showingChanged? Jan 06 20:39:59 I'm curious what popup it thinks is showing. Jan 06 20:40:06 yes, Jan 06 20:40:43 done. Jan 06 20:40:48 I think it's a bug in your code plus a possible bug in in enyo. Jan 06 20:40:59 say it isn't so! Jan 06 20:41:29 sorry sugardave, I break everything. Jan 06 20:41:44 even the fourth wall Jan 06 20:42:03 you join a long line of illustrious thing-breakers that have gone before you Jan 06 20:43:04 I had to look up what the fourth wall was. Jan 06 20:43:28 Hmm, not seeing any other popups. :/ Jan 06 20:43:29 XD Jan 06 20:48:31 trex005: I think I figured it out and it may be a slight mess. Jan 06 20:48:40 Uhhh ohh, my code? Jan 06 20:48:42 nope Jan 06 20:49:04 Delete line 50 from onyx/Popup.js (this.showHideScrime) Jan 06 20:49:47 done Jan 06 20:50:21 And at the start of showHideScrim in onyx, add a 'this.inherited(arguments);' Not positive yet whether that's a good idea or not. :) Jan 06 20:50:26 well, that seems to be working Jan 06 20:51:08 done Jan 06 20:52:34 OK, let me file a bug and work on a correct fix for this. Jan 06 20:52:44 We're going to hold off on 2.5.1.1 until the fix is in, so to speak Jan 06 20:52:53 Okay, if I leave it as is for now, will it blow my app up? Jan 06 20:54:09 no, should be fine. Jan 06 20:54:26 aside from the unintentional rubber duckies Jan 06 20:54:29 but don't worry Jan 06 20:54:32 they're harmless Jan 06 20:54:33 :P Jan 06 20:59:39 trex005: I figured out your problem Jan 06 20:59:54 enyo.version Jan 06 20:59:55 Object {enyo: "2.5.1.1", layout: "2.4.0-pre.1", onyx: "2.4.0-pre.1"} Jan 06 21:00:00 You didn't update onyx or layout. Jan 06 21:01:09 Now, we will pelt you with rocks. Jan 06 21:01:40 :) Jan 06 21:01:48 Roy__, did you get what I mean now ? Jan 06 21:04:20 Roy, okay, I'm an idiot. Jan 06 21:04:38 So, will it work if I update those? Was that the root of my problem? Jan 06 21:05:27 It should work just fine. Jan 06 21:05:43 yes, popup relocated from onyx to enyo Jan 06 21:06:01 Or scrim did. Something. Jan 06 21:07:26 Whoa I have to declair enyojs scroll back bankruptcy Jan 06 21:08:04 I guess I really should learn how to use git so I can update more easily. Jan 06 21:08:28 Sorry, I know how to use git, I don't know how to make my sub folders other repos Jan 06 21:15:54 I've updated layout and onyx, but now onyx.Popup doesn't seem to be able to locate the scrim Jan 06 21:24:43 git submodule add (other repo) Jan 06 21:27:42 Roy__: it seems enyo\source\views\ImageDetails.js line 93 should be changed to Scrim instead of onyx.Scrim, but then the popups don't have the correct styling. Jan 06 21:28:26 Maybe I didn't update something again! Jan 06 21:46:30 If I want to pass a local function as a string to a kind I created, (kinda like you pass ontap) how to I handle that within the kind? Jan 06 21:48:11 So, for example, I want my popup kind to have an onclose:'FunctionName' Jan 06 21:53:38 I assume you mean something like {kind:’myKind’, ontap: ‘handleOnTap’} Jan 06 22:00:34 example trex005 http://jsfiddle.net/toxigenicpoem/5k84prLe/ Jan 06 22:08:32 Thank you Jan 06 22:23:51 dmanderson: this example, to my understanding, if you press cancel, should not alert('you closed'); but it does, can you help me understand, or show me a way that I can return false to prevent an action? http://jsfiddle.net/trex005/pyex33kq/ Jan 06 22:25:20 here you go! confirm('Ok to close, cancel to not'); Jan 06 22:25:23 lol oops Jan 06 22:25:27 http://jsfiddle.net/toxigenicpoem/pyex33kq/1/ Jan 06 22:25:30 copy paste failure Jan 06 22:51:58 dmanderson: is there a way to return false from the function I'm passing? Jan 06 22:52:30 you can pass it as a param into the event if you want Jan 06 22:53:25 shouldn't doClose() return whatever the function it is calling returns? Jan 06 22:57:14 doClose() is propigating an event Jan 06 22:57:19 So if you pass doClose(someval) Jan 06 22:57:28 that will get passed into the function it will be bound to Jan 06 22:58:42 example : http://jsfiddle.net/toxigenicpoem/pyex33kq/2/ Jan 06 22:59:24 Okay, I can pass values from my kind to the called function that way, but I'm trying to do it the other way around. I want myFunc to be able to return false and prevent an action in func Jan 06 23:00:27 kind of like bubbling, if it returns false, the calling function does not take an action. Jan 06 23:00:29 if the depth of the components isn’t too deep, you can waterfall an event Jan 06 23:00:50 otherwise you would just put a if statement in to either call or not call the method directly on the child. Jan 06 23:01:34 Going up in a DOM is more efficent then going down - so there isn’t really a ‘this way is the best way to do it’ Jan 06 23:01:45 You also have Observers and Bindings you can rely on as well Jan 06 23:01:59 Let me explain what I'm trying to do, and maybe there is a better way. Jan 06 23:03:00 I have a popup class, which has a close button on it. When the close button is clicked, it calls a function for form validation, and if validation fails, it will prevent the popup class from calling .hide() Jan 06 23:04:03 ok following so far :) Jan 06 23:04:29 this is where setting showing directly is helpful...if the form validation returns true/false you can say popup.set("showing", formValid()); Jan 06 23:04:36 or whatever your validator function is Jan 06 23:04:55 So, I'm passing the form validation function to the generic popup class. If that form validation returns false, I want to not self close Jan 06 23:04:56 or !formValid() whichever one you need Jan 06 23:05:51 right, but I need to call !formValid() from within my kind Jan 06 23:06:20 which is passed to it via onClose='formValid' Jan 06 23:08:00 so, onClose is fired after .close() is already done, so you have a logic issue there Jan 06 23:08:26 better to overwrite your popup class's close method and check formvalid there Jan 06 23:08:36 imo Jan 06 23:09:15 Could I use a different name for passing the function? validate='formValid' ? Jan 06 23:09:29 and the close override could basically do: this.set("showing", formValid()); Jan 06 23:09:53 more like http://jsfiddle.net/toxigenicpoem/pyex33kq/3/ ? Jan 06 23:12:40 is there any way to put the confirm within myFunc, so it is outside of the generic testctrl? Jan 06 23:13:54 that is the key here, the return false needs to be in the validation function which is passed to the Generic popup control Jan 06 23:18:23 I guess I'm not explaining myself very well. **** BEGIN LOGGING AT Tue Jan 06 23:22:13 2015 Jan 06 23:23:15 Is there any other method of passing a function in that I can execute and get a return value from? Jan 06 23:23:35 here is how I did it, if you wanted to derive your own onBeforeHide event https://github.com/enyojs/enyo/pull/898/files Jan 06 23:23:45 then you could cut off the popup from hiding. Jan 06 23:24:08 The problem like sugardave mentioned is that the event is thrown after the popup is hidden. Jan 06 23:24:18 There isn’t actually a way to use the current popup in it’s state as is. Jan 06 23:25:02 Well, I actually have a wrapper kind on the popup, does that change anything? So my wrapper kind has a sub component which I .hide() on. Jan 06 23:25:40 you could always pass logic there, and determine if you should .hide or .show Jan 06 23:25:47 So .hide() is never automatically executed, I have to call it myself Jan 06 23:27:41 in your patch, I don't see where you use onBeforeHide, I only see you declaring it. Jan 06 23:40:03 it would be an exposed event like onHide Jan 06 23:47:57 okay, here is the complete code of what I am trying to do : Jan 06 23:47:58 http://jsfiddle.net/trex005/pyex33kq/5/ Jan 06 23:48:36 function validator needs to be able to return false to block ScrimmedPopup from closing Jan 06 23:50:33 whoops, there were some bugs : http://jsfiddle.net/trex005/pyex33kq/7/ Jan 07 01:05:19 sorry trex005 was side tracked, looking now Jan 07 01:09:48 trex005 http://jsfiddle.net/toxigenicpoem/pyex33kq/8/ Jan 07 01:35:25 welcome hunternet93 Jan 07 01:38:27 dmanderson: You are awesome! :) Jan 07 01:39:30 Definitely a clever way to go about it. Jan 07 01:40:42 np, glad to help! **** ENDING LOGGING AT Wed Jan 07 02:59:58 2015