Results 1 to 3 of 3

Thread: 2.0 RTM - Issue with Ext.mixin.Identifiable.getUniqueId

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Mar 2009
    Posts
    240
    Vote Rating
    1
      0  

    Default 2.0 RTM - Issue with Ext.mixin.Identifiable.getUniqueId

    Here's a section of code from Ext.mixin.Identifiable.getUniqueId:

    Code:
    if (!id) {
                prototype = this.self.prototype;
                separator = this.defaultIdSeparator;
    
    
                uniqueIds = Ext.mixin.Identifiable.uniqueIds;
    
    
                if (!prototype.hasOwnProperty('identifiablePrefix')) {
                    xtype = this.xtype;
    
    
                    if (xtype) {
                        prefix = this.defaultIdPrefix + xtype + separator;
                    }
                    else {
                        prefix = prototype.$className.replace(this.idCleanRegex, separator).toLowerCase() + separator;
                    }
    
    
                    prototype.identifiablePrefix = prefix;
                }
    
    
                prefix = this.identifiablePrefix;
    
    
                if (!uniqueIds.hasOwnProperty(prefix)) {
    The problematic one is highlighted in Red above, it should have been:

    Code:
    prefix = prototype.identifiablePrefix.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,411
    Vote Rating
    1290
      0  

    Default

    Thanks for the report.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User Jacky Nguyen's Avatar
    Join Date
    Jul 2009
    Location
    Palo Alto, California
    Posts
    469
    Vote Rating
    18
      0  

    Default

    The original code is correct. 'identifiablePrefix' is taken either from the instance itself, or inherited from the prototype.
    Sencha Touch Lead Architect

Posting Permissions

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