Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Ext.forEach

  1. #11
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    2,377
    Vote Rating
    720
      -2  

    Default

    The cleaner and nicer the program, the faster it's going to run. And if it doesn't, it'll be easy to make it fast.

    - Joshua Bloch (Google)

  2. #12
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    2,377
    Vote Rating
    720
      -2  

    Default

    Quote Originally Posted by evant View Post
    Ideally, yes. Practically, not quite there yet! http://triin.net/2011/03/02/Optimizi...h:_Not_so_fast!
    There must be a way to do this sort of conversion. CoffeeScript converts their loops into traditional JavaScript loops, see this.

  3. #13
    Sencha User mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,061
    Vote Rating
    19
      0  

    Default

    Quote Originally Posted by LesJ View Post
    There must be a way to do this sort of conversion. CoffeeScript converts their loops into traditional JavaScript loops, see this.
    I'm just getting into CoffeeScript, having implemented it in SilkJS.

    It seems like a lot of work to wrap ExtJS with CoffeeScript, but it could be interesting in the end. If you're just using client-side, though, it adds another build step and I think it might be difficult to debug generated JavaScript in the browser...

  4. #14
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    2,377
    Vote Rating
    720
      -2  

    Default

    Quote Originally Posted by LesJ View Post
    I found an Ext.each that should be converted to a plain for loop.

    Code:
    Ext.define('Ext.util.AbstractMixedCollection', {
        ...
        removeAll : function(items){
            Ext.each(items || [], function(item) {
                this.remove(item);
            }, this);
    
            return this;
        },
        ...
    Fixed in nightly:

    Code:
        removeAll : function(items) {
            items = [].concat(items);
            var i, iLen = items.length;
            for (i = 0; i < iLen; i++) {
                this.remove(items[i]);
            }
    
            return this;
        }

  5. #15
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Vote Rating
    1381
      0  

    Default

    There are quite a lot of function iteration fixes we have in. Not all of mine mad it in I don't think but quite a few.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •