Results 1 to 7 of 7

Thread: proxy exception codes to undefined variable me

    Success! Looks like we've fixed this one. According to our records the fix was applied for DSGNR-1457 in a recent build.
  1. #1
    Sencha Premium Member svenna's Avatar
    Join Date
    Jun 2007
    Location
    Oslo,Norway
    Posts
    658
    Vote Rating
    40
      0  

    Default proxy exception codes to undefined variable me

    When adding an exception even to a RestProxy the generated code refers an undefined variable: me.

    ExtJs, Build 298

    Code:
        proxy: {
            type: 'rest',
            url: '../../webroot/rest/prosjektinfo',
            reader: {
                type: 'json',
                root: 'results'
            },
            writer: {
                type: 'json'
            },
            listeners: {
                exception: {
                    fn: me.onRestproxyException,
    Uncaught ReferenceError: me is not defined
                    scope: me
                }
            }
        },
    Sven Tore Iversen

  2. #2
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488
    Vote Rating
    147
      0  

    Default

    Thanks for the bug report.
    Aaron Conran
    @aconran

  3. #3
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488
    Vote Rating
    147
      0  

    Default

    svenna -

    In the latest build, the reference is there. I believe we fixed this as part of the code generation/override fixes. Could you please confirm?
    Aaron Conran
    @aconran

  4. #4
    Sencha Premium Member svenna's Avatar
    Join Date
    Jun 2007
    Location
    Oslo,Norway
    Posts
    658
    Vote Rating
    40
      0  

    Default

    Something changed, but not there yet..

    There is a new code generated, no listeners is defined, only a function.
    Also, the designer gives a red-exclamation error saying: "Invalid Configuration Click for details" => "A valid function must have fn set. In addition, a function of a non top level component must match a configuration"

    Generated code, from build 311

    Code:
    Ext.define('EcoInteractive.model.Pumpe', {
        extend: 'Ext.data.Model',
        config: {
            idProperty: 'Id',
            proxy: {
                type: 'rest',
                url: '../webroot/rest/pumper/',
                reader: {
                    type: 'json',
                    rootProperty: 'data'
                },
                writer: {
                    type: 'json',
                    writeAllFields: false
                }
            },
            fields: [
                {
                    name: 'Id',
                    type: 'int'
                },
                {
                    name: 'navn'
                },
                {
                    name: 'modell',
                    type: 'int'
                },
                {
                    name: 'modellnavn'
                },
                {
                    name: 'serienummer',
                    type: 'int'
                },
                {
                    name: 'cscu'
                },
                {
                    dateFormat: 'Y-m-d',
                    name: 'installert',
                    type: 'date'
                },
                {
                    name: 'status'
                },
                {
                    name: 'kunde',
                    type: 'int'
                },
                {
                    name: 'installertavstr'
                }
            ]
        },
    
        onRestproxyException: function(server, response, operation, options) {
            Ext.Msg.alert('Feil','Det oppstod en feil under kommunikasjon med serveren');
        }
    
    });
    Sven Tore Iversen

  5. #5
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488
    Vote Rating
    147
      0  

    Default

    In your last post, you mention 2 other bugs that I am aware of. The first regarding the error message which has since been solved and will be released with build 330 (coming within a week).

    The 2nd bug is that in Touch the listeners is not set to link to the exception.

    Your original post was a bug report for Ext JS though, is that one fixed?
    Aaron Conran
    @aconran

  6. #6
    Sencha Premium Member svenna's Avatar
    Join Date
    Jun 2007
    Location
    Oslo,Norway
    Posts
    658
    Vote Rating
    40
      0  

    Default

    Obs, sorry.. Did a touch app release yesterday so I was all "touch" when replying. Yes, this is now fixed with ExtJs projects

    Thanks
    Sven Tore Iversen

  7. #7
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488
    Vote Rating
    147
      0  

    Default

    Both of the above stated bugs are now resolved.
    Aaron Conran
    @aconran

Posting Permissions

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