**** BEGIN LOGGING AT Fri Sep 19 03:00:00 2014 **** BEGIN LOGGING AT Fri Sep 19 15:42:01 2014 Sep 19 18:20:31 Hello Enyo friends. I was wondering, for my DataRepeater, how I can specify a collection relative to "this"? Sep 19 18:21:00 I tried this.$.collectionName Sep 19 18:21:54 what do you mean? Sep 19 18:23:20 in the fiddle we were working on the other day : http://jsfiddle.net/trex005/nq5fvroo/ we specified the collection for the DataRepeater by calling a global variable, "app" Sep 19 18:23:32 I want to use "this" instead, is that possible? Sep 19 18:23:58 Actually, in my app, I tried a global variable as well, and it still didn't work :( Sep 19 18:24:23 well Sep 19 18:24:45 as long as the function is called on the correct "this", it should work Sep 19 18:27:19 http://jsfiddle.net/trex005/nq5fvroo/1/ Sep 19 18:28:04 Ohhh, I bet it's not the correct this. Sep 19 18:29:19 would I tried this.owner.$.imageCollection Sep 19 18:29:42 nix would Sep 19 18:30:23 ?_? Sep 19 18:30:37 I tried this.owner.$.imageCollection as the collection as well Sep 19 18:37:05 you shouldn't ever be calling on variables in the owner Sep 19 18:37:09 it breaks encapsulation Sep 19 18:37:16 preach it! Sep 19 18:37:50 I tried it because the scope in DataRepeater seems to be broken Sep 19 18:37:50 and, lo, the Enyo devs of the world shunned breaking encapsulation, and they found that it was good Sep 19 18:38:09 So I was hoping that maybe the scope for the collection was also broken, just like the events Sep 19 18:38:34 ? Sep 19 18:38:48 so this.owner might have actually been what I expected this to be. Sep 19 18:39:27 rather than blindly doing it, why not drop some enyo.logs in there or some breakpoints to check exactly what they are Sep 19 18:41:17 my problem is that the collection seems to not be pointing to the right place. I'm not sure how I could put a breakpoint in to check where it's pointing to Sep 19 18:41:36 collection: "this.$.imageCollection", Sep 19 18:44:25 another question would be "why not use an app-wide collection?" Sep 19 18:44:47 (yes, it technically breaks encapsulation, but in the sanctioned Enyo way) Sep 19 18:45:05 Well, this is one control panel nested deep inside the app. Sep 19 18:45:20 do you think I should? Sep 19 18:45:22 trex005: I thought you were talking about using it in the function Sep 19 18:45:31 If it is in the function, you can set a breakpoint Sep 19 18:45:47 so? an app's components is going to always be available at any component level as this.app.$.whatever Sep 19 18:45:59 maybe you should pastebin exactly what you have? Sep 19 18:46:37 sugardave: His point is that he shouldn't have a random collection in the app, otherwise he'd have a ton of them Sep 19 18:46:44 in other words, if you use an enyo.Applcation, its name is already a global var Sep 19 18:46:54 it isn't random. it's one at the top level of the app Sep 19 18:47:20 http://pastebin.com/ejEfB24u Sep 19 18:48:12 is it because there are going to be multiple collections? maybe you still just have one and us BucketFilter to filter the collection based on what view you're using it in or soemthing Sep 19 18:48:27 s/us B/use B/ Sep 19 18:48:27 sugardave meant: is it because there are going to be multiple collections? maybe you still just have one and use BucketFilter to filter the collection based on what view you're using it in or soemthing Sep 19 18:49:33 yes, there will be multiple collections, but a limited number of them. Sep 19 18:49:42 I could just have one collection for each Sep 19 18:51:17 trex005: don't use pastebin.com. use better pastebins like ix.io or sprunge Sep 19 18:53:11 ohhhh I don't know how to use those Sep 19 19:33:43 trex005: So you *are* using it in a function. So just add a breakpoint there Sep 19 19:36:14 I ended up using an app level collection as sugardave suggested and it's working now. Sep 19 19:36:28 I just finished recoding Sep 19 19:38:08 lol Sep 19 19:38:33 interestingly enough though, I put a scroller inside my popup window, and it wrapped my whole app instead... Sep 19 19:38:52 o.o Sep 19 19:39:17 dynamically added? Sep 19 19:40:14 Nope.... I'm sure I have a bug somewhere.... I'm debugging now :) **** ENDING LOGGING AT Sat Sep 20 03:00:00 2014