1. #11
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,405
    Vote Rating
    150
    dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold

      0  

    Default FocusManager API

    FocusManager API


    The API to FocusManager has changed somewhat and should be much better as well as more efficient. See http://www.sencha.com/forum/showthre...l=1#post678781
    Don Griffin
    Engineering Manager - Frameworks (Ext JS / Sencha Touch)

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"
    -->

  2. #12
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,405
    Vote Rating
    150
    dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold

      0  

    Default


    Quote Originally Posted by aenigmatic View Post
    I have encountered problems with previously overridden methods. The Ext.foo.override() method is listed as depracated, but it seems all out broken to me. I have had good luck switching to Ext.define, and there is good documentation, but just something to add to the list potentially.
    If you can reproduce a bug with override, please report it in a new thread (see also http://www.sencha.com/forum/showthre...o-report-a-bug). Thanks!
    Don Griffin
    Engineering Manager - Frameworks (Ext JS / Sencha Touch)

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"
    -->

  3. #13
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,405
    Vote Rating
    150
    dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold

      0  

    Default doComponentLayout

    doComponentLayout


    Dmitry Pashkevich asked a good question in response to the blog post http://www.sencha.com/blog/whats-new-in-ext-js-4-1.

    The question was about how doComponentLayout works now in 4.1 and how that would effect a component author who might have overridden this method. The answer to this has been added to the top of this thread.
    Don Griffin
    Engineering Manager - Frameworks (Ext JS / Sencha Touch)

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"
    -->

  4. #14
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,405
    Vote Rating
    150
    dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold

      0  

    Default


    The bug with style names not supporting camelCase has been fixed in Beta 1.
    Don Griffin
    Engineering Manager - Frameworks (Ext JS / Sencha Touch)

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"
    -->

  5. #15
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,408
    Vote Rating
    179
    LesJ is a splendid one to behold LesJ is a splendid one to behold LesJ is a splendid one to behold LesJ is a splendid one to behold LesJ is a splendid one to behold LesJ is a splendid one to behold LesJ is a splendid one to behold

      0  

    Default Class Configuration changes

    Class Configuration changes


    There have been class configuration changes in 4.1 (that are not present in 4.0.7).

    For example, adding a config variable generates corresponding 'apply' and 'update' methods. The 'update' method is new in 4.1.

    See more info here
    -->

  6. #16
    Sencha User
    Join Date
    Oct 2010
    Location
    Düsseldorf, Germany
    Posts
    3
    Vote Rating
    0
    goreng is on a distinguished road

      0  

    Default reader has changed...

    reader has changed...


    Hello Sencha Team,

    I've got some problems to upgrade my Ext4.0.7 application to Ext4.1. I haven't found a detailed description, which changes are made to the Reader-Class, may be someone here can help me with this.

    I have implement a "native" Coldfusion-Reader-Class. Therefore I extend Ext.data.reader.Json and override the readRecords function:

    PHP Code:
    readRecords: function(data) {
            
    this.checkColumns(data);
            return 
    this.callParent([data]);
        } 
    The new checkColumns function build nothing else than extractorFunctions based on the data.
    (
    The "native" Coldfusion way to send data as json is for example:
    PHP Code:
    {
            
    COLUMNS : ["COLUMN1","COLUMN2"],
            
    DATA          : [
                                     [
    "data1.1","data2.1"],
                                     [
    "data1.2","data2.2"]
            ]

    )

    So I only have to read the fields-Config and map the right array-index from the COLUMNS-array regarding the field.mapping or if not provide the field.name.

    After finding the right index for a field, I build the current extractorFunction in the checkColumns function by :

    PHP Code:
    //Loop over the fields config array
    var fields this.model.prototype.fields.items0length fields.lengthextractorFunctions = [], mapmIndex;
    for (; 
    lengthi++) {
         ...
         
    //code for finding the correct array index 'mIndex' (still working correct in Ext4.1)
         
    ...
         
    extractorFunctions.push(function(index) {
                  return function(
    data) {
                         return 
    data[index];
                  };
          }(
    mIndex)); 
    }
    //Assign the new extractorFunctions to the reader
    this.extractorFunctions extractorFunctions
    This works very fine in 4.0.7, but not in 4.1.

    Is there something changed in the base Reader class, which override my extractor functions?
    -->

  7. #17
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Yes, the extraction of data from the raw object into each record's data property has changed.

    Instead of generating an accessor function for every field, and then calling that in a loop for every field of every record read, we do something better in 4.1

    We generate a function which extracts all fields from a raw row into the data property in one shot.

    This function is formatted so that if you step into it, you will be able to read what it does and step through in the debugger.

    So look at line 421 in Reader, you will see

    Code:
    me.convertRecordData(convertedValues, node, record);
    "node" is the raw data row. "convertedValues" is a reference to the new record's data object.

    That is the generated function which does the field converting and copying.

    If you step in, you will be inside a function which looks a little like this one which is used by the ArrayReader of the basic array grid example:

    Code:
    function(dest, source, record) {
            dest["company"] = (source[0] === undefined) ? __field0.defaultValue : source[0];
            dest["price"] = __field1.convert((source[1] === undefined) ? __field1.defaultValue : source[1], record);
            dest["change"] = __field2.convert((source[2] === undefined) ? __field2.defaultValue : source[2], record);
            dest["pctChange"] = __field3.convert((source[3] === undefined) ? __field3.defaultValue : source[3], record);
            dest["lastChange"] = __field4.convert((source[4] === undefined) ? __field4.defaultValue : source[4], record);
        }
    You can see that it will be must more efficient that looping through field access expressions.

    You can also see that it is created as a closure inside a scope which captures useful references.

    "me" is a reference to the Reader. And you have vars set up which reference the Field definitions for each Field.

    Your custom reader needs to implement a createFieldAccessExpression method. It is private now, so custom readers are not officially supported even though they obviously have been around for a while.

    This function will be passed field, fieldVarName, dataName

    field is a reference to the Ext.data.Field object which describes the field you are creating an access expression for.

    fieldVarName is a string which is the name of the var which references that Field object in the scope of the function that will be using your returned expression. So the code you create can use this string as a var name. In that example above they are "__field1", "__field2" etc (We cannot call them your defined field names in case they are reserved words... we actually made that mistake in beta code)

    dataName is the name of the object from which the data is being extracted. So it's the name of the var which contains ["data1.1","data2.1"]
    -->

  8. #18
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    But that looks like you just need an ArrayReader. Can you use an ArrayReader with your returned data?
    -->

  9. #19
    Sencha User
    Join Date
    Oct 2010
    Location
    Düsseldorf, Germany
    Posts
    3
    Vote Rating
    0
    goreng is on a distinguished road

      0  

    Default


    @animal

    Thank you for your advice. I'll look at the detail today.

    Yes, that's right. Basically, I need an ArrayReader. But the problem with the ArrayReader is that I need fixed indices to configure it. But fixed indices are not given in the application or better in the data return and may change with each call. Only the specific fields are fixed, but not the current index of the field in the array in the data return. However, since the "COLUMNS" are sent, which describing the current field indices, I can use them to define the "dynamic" indexes (you can also be interpreted it as a metaChange event on each call ).

    To implement my "CfQueryReader" I mixed the techniques of the JsonReader and the ArrayReader to get the best of both . I really like the way how to configure a JsonReader, because it is more "readable" for me, and the ArrayReader does not need the "data overhead" to combine each field data set with the field name.
    -->

  10. #20
    Sencha User ykey's Avatar
    Join Date
    Mar 2010
    Location
    USA
    Posts
    245
    Vote Rating
    27
    ykey has a spectacular aura about ykey has a spectacular aura about

      0  

    Default


    Ext.data.NodeInterface#decorate now expects the model class instead of a model record. Could this check for a record and extract its class as well to not break backward compatibility with 4.0?
    -->