**** BEGIN LOGGING AT Mon Aug 03 02:59:58 2015 Aug 03 16:55:34 good morning Aug 03 16:58:17 The Enyo API documentation says to call getValue() but I don't see a getValue() method. http://enyojs.com/docs/latest/#/kind/enyo.Input Aug 03 17:00:03 Zectbumo: implicit getter for the published value property Aug 03 17:00:28 anything that is published will have getters and setters implicitly generated for them. Aug 03 17:00:40 ah right Aug 03 17:05:22 separate issue: I keep finding myself in some jammed up situation in any framework (including my own) when I try to use events to control behaviour. Aug 03 17:06:26 So, I wrote up an enyo jsfiddle to try to show my contention http://jsfiddle.net/eqobcxsa/1/ Aug 03 17:09:08 assume line 36: sessionStorage.loginName = this.loginName; is an expensive operation. How do I code this so it doesn't get set on initialization? Aug 03 17:12:46 Zectbumo: simple. Take out the line that does the same thing on line 31 of create() Aug 03 17:12:59 :P Aug 03 17:20:27 GodGinrai: so remove the set loginName and repeat the contents of loginNameChanged() minus the offending parts Aug 03 17:21:20 Zectbumo: No. It's quite simple. This operation is happening on intiialization because you have it in a function that is always executed on initialization (create) Aug 03 17:21:41 there are no "offending parts" aside from that line in create Aug 03 17:22:29 I'm looking to initialize the loginName though from storage. If I simply delete that then the app won't work properly on refresh. Aug 03 17:24:28 oh whoops, I read it wrong Aug 03 17:24:30 hrm Aug 03 17:24:39 then I don't see where you are seeing this problem Aug 03 17:24:59 because loginNameChanged is not being called on init Aug 03 17:25:17 on line 32 Aug 03 17:26:11 ahhhh Aug 03 17:26:11 ok Aug 03 17:26:18 line 32 reads the value, and then line 36 sets the value (right after reading it). That's the part I am trying to avoid Aug 03 17:26:23 I see Aug 03 17:26:24 well Aug 03 17:26:50 you don't get this issue? I seem to run into it a lot Aug 03 17:27:01 I don't fiddle with sessionStorage, honestly Aug 03 17:27:08 but I think I know the solution to your problem. Aug 03 17:27:45 well, I just used sessionStorage to show you locally on your browser. Generally an app has to go fetch from a database after some API or HTTP call Aug 03 17:32:06 ok, well, this is weird in multiple ways Aug 03 17:32:14 because of the way you are using sessionStorage Aug 03 17:38:12 Zectbumo: http://jsfiddle.net/eqobcxsa/7/ Aug 03 17:38:32 ^ Properly unset sessionStorage and you can use it correctly :) Aug 03 17:44:05 okay, interesting. Aug 03 17:45:08 so this solution depends on loginNameChanged not being called twice. And this works since this is a login situation where a login doesn't happen twice. Aug 03 17:47:06 yea. Aug 03 17:47:36 Are you trying to keep a value from being set when it may already be set? Aug 03 17:52:23 well, yes sort of. I know it is set. Like me asking you, what's your name? You say GodGinrai and then I turn around and tell you to remember that your name is now GodGinrai. Aug 03 17:52:54 so, of course it is. you just told me that. Aug 03 17:53:40 but that case only happens when initializing because the app needs to get in sync Aug 03 17:54:12 this really feels like an XY question Aug 03 17:54:32 Zectbumo: http://www.perlmonks.org/index.pl?node_id=542341 Aug 03 17:55:14 yes, it is an XY question Aug 03 17:57:09 well, sorta yes and no. You did solve an actual problem. I was looking for the solution you gave me but I was hoping for an answer that will solve my future similar design pattern issue. Aug 03 17:57:46 so as it stands I'm going to have to solve it case by case. Aug 03 17:58:10 k Aug 03 17:59:51 I was hoping to hear something like, oh Enyo passes in arguments to loginNameChanged(inOldValue, inNewValue, inVarName, inState) and inState you will find .create property that is set to true when called from create. Aug 03 18:00:23 …which all of that does happen except for that the create property is ALWAYS true it seems. Aug 03 18:00:59 Like I said, I don't think you are really articulating your problem well. Aug 03 18:01:07 and looking for a much more complicated solution than you need Aug 03 18:01:16 where is this in the docs? I'm interested in knowing about the 4th argument in the Changed method Aug 03 18:01:44 the changed method has a 4th argument? Aug 03 18:02:03 I don't ever use it's arguments, so honestly, your "oldValue" came as a bit of a surprise to me Aug 03 18:02:08 *its Aug 03 18:02:21 yeah, I ran into it trying to look for a way. I don't know where it's documented though Aug 03 18:02:55 ah, heh. yeah, oldValue is what the docs show. but nothing more. There ends up to be 4 arguments! Aug 03 18:03:42 Anyway, if you give me an actual problem that matches up with the kinds of problems you are having, I can explain how to solve it. Aug 03 18:04:13 But all of this vague wording is not helping me to understand what you actually want. Aug 03 18:05:26 no, that's what I mean. That WAS an actual problem. I'm just not looking forward to running into the problem again in the future when I can't get out of it in this similar fashion. BUT, when that time comes, I'll bring it up :) Aug 03 18:05:41 k Aug 03 18:07:02 hmm, I think I might have a second part to this. It's related to a DataRepeater and login. So I may reuse this fiddle for that. Aug 03 18:07:47 k Aug 03 18:08:23 thanks GodGinrai. Also, is there any use of Enyo that you saw here where you have some constructive criticism? This is pretty close to how I've been using Enyo Aug 03 18:09:06 yes, actually Aug 03 18:09:55 For non-conflicting events (like login), You should put those in a handlers hash rather than a property of the enyo component Aug 03 18:10:32 oh, what's a handler hash? Aug 03 18:11:03 like the events hash you used. There's one for handlers that can define functions to handle an event that is received. Aug 03 18:13:30 example here: http://jsfiddle.net/eqobcxsa/8/ Aug 03 18:14:29 oh and that automatically calls login onLogin Aug 03 18:14:37 also, general style nitpick, but handlers are a lot easier to track down if you name them with a similar style. For example: handleLogin, handleLogout, etc. Aug 03 18:14:40 yup Aug 03 18:15:48 Also, you should probably stop using renderInto and start using enyo.App Aug 03 18:16:39 I was actually thinking of doing that. Esp. since that last time I ran into that html,body{height:100%} issue you helped me with a while back Aug 03 18:16:57 also, anything inheriting from enyo.Control has show() and hide() functions, so you don't need to set showing manually Aug 03 18:18:04 yup, I knew about those. I needed a toggle based on a boolean method. Aug 03 18:18:41 I could expand them into an if statement and then use show() hide() else hide() show() Aug 03 18:19:40 I really like that handlers section Aug 03 18:20:58 yea, it's really useful Aug 03 18:21:10 makes it a lot easier to understand the flow of your data Aug 03 18:23:43 GodGinrai: http://jsfiddle.net/eqobcxsa/9/ Aug 03 18:27:47 oops, forgot to also change the name to handleLogout. http://jsfiddle.net/eqobcxsa/10/ Aug 03 18:28:10 what were the "general style nit picks" you were talking about? Aug 03 18:30:50 the naming of the handler functions was the general style nitpick Aug 03 18:31:03 nice, so I got everything you saw? Aug 03 18:31:12 yea, mostly Aug 03 18:31:27 there may be more, but I'm being pulled 3 different directions currently XD Aug 03 18:31:49 I'm *really* starting to wish we had rolled our own select widget instead of using react-select <.< Aug 03 18:34:03 np. I'm just enjoying Enyo for the fun of it. Thanks again GodGinrai. Aug 03 18:35:54 yea, I enjoy enyo, too. Aug 03 18:36:02 But we're not using it at my job <.< Aug 03 18:36:21 tisk tisk Aug 03 18:39:59 That's not something I can sway Aug 03 18:40:40 j/k, when do we ever get to work in the environment we like? Aug 03 18:40:58 lol Aug 03 18:41:04 well, my environment is not too bad Aug 03 18:41:13 and it's certainly better than what I had before this job Aug 03 18:43:20 the closest I got was when I was doing Python and Twisted and using SVN (git/hg/bzr wasn't invented yet) Aug 03 18:43:57 I've got an ArchLinux work laptop, use git and docker, and code frontends using JS Aug 03 18:44:14 but the JS is using React Aug 03 18:44:24 which is still better than Angular and others, but it's not enyo Aug 03 18:46:07 neat. how do you like Docker? I haven't looked into that much. I still don't know how they solved the issues where you need, let's say OS specific ethernet adapter info. Aug 03 18:46:49 It's pretty awesome Aug 03 18:47:07 Also, you don't really need OS-specific ethernet adapter info, like... ever Aug 03 18:47:11 I think I said that wrong, I mean ethernet adapter info which typically is gotten by OS specific API Aug 03 18:47:27 why would you need ethernet info? Aug 03 18:48:02 I needed that once. I think it was for a discovery protocol and it needed to look for what addresses were available on what NICs Aug 03 18:48:30 hrm Aug 03 18:48:53 well, if the kernel can provide it, then it should be able to do it. otherwise, I'm not sure Aug 03 18:49:22 "it" being docker should be able to provide it? Aug 03 18:49:59 well, docker gives you limited access to the kernel, so if the kernel can provide it, you should probably be able to access that information Aug 03 18:50:43 ah, okay. but that would be OS specific calls, which I thought the point was that you didn't need to program for FreeBSD/Linux Aug 03 18:51:10 Zectbumo: docker is just a fancy wrapping on linux containers. All calls will be linux-specific Aug 03 18:51:20 OH! Aug 03 18:52:13 that solves a lot of problems :) Aug 03 18:52:21 yup Aug 03 20:49:29 GodGinrai: welcome back Aug 03 20:50:18 ty **** ENDING LOGGING AT Tue Aug 04 02:59:58 2015