1. #1
    Ext JS Premium Member
    Join Date
    Dec 2010
    Location
    Luxembourg
    Posts
    132
    Vote Rating
    0
    EAHC-IT is on a distinguished road

      0  

    Default Deploy -> Ghost object , duplicated ID and metadata folder

    Deploy -> Ghost object , duplicated ID and metadata folder


    Hello,

    When I deploy my project, I receive a message "The following component are missing a store: MyComboBox38"
    But I do not have any compoment with that id/itemid.
    To be sure, I have searched through all files (/gc/*.*) with InfoRapid Search and Replace: nothing found;

    *******************
    Another point, is that it warn me about duplicate IDs. I have a "home made" component (window) that I reuse several time, on this window I have numberfield that I need to provide IDs (I sum values from those numberfield in a total numberfield through the onchange event on each). This should not be a problem as the window destroy itself on close, right?

    ********************
    Last, I was wandering why having created a metadata folder instead of storing the information in the xds...

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,185
    Vote Rating
    63
    aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice

      0  

    Default


    Quote Originally Posted by EAHC-IT View Post
    When I deploy my project, I receive a message "The following component are missing a store: MyComboBox38"
    But I do not have any compoment with that id/itemid.
    We've had one or two reports of similar things. If you search the metadata for this id can you find it? Are you able to share the project with us (you can privately at architect.feedback at sencha.com)?

    Quote Originally Posted by EAHC-IT View Post
    Another point, is that it warn me about duplicate IDs. I have a "home made" component (window) that I reuse several time, on this window I have numberfield that I need to provide IDs (I sum values from those numberfield in a total numberfield through the onchange event on each). This should not be a problem as the window destroy itself on close, right?
    Yes, but in general this is against best practices. What if you needed to show two of those components at the same time? This would break down. The best thing that you can do is assign itemId's. itemId's are just like id's except for the fact that they must be unique to their particular container. Id's on the other hand must be unique to the entire global page.

    Quote Originally Posted by EAHC-IT View Post
    Last, I was wandering why having created a metadata folder instead of storing the information in the xds...
    Architect does this to integrate better with source control. When a single component is added or modified you only change one little file rather than one MASSIVE file.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Ext JS Premium Member
    Join Date
    Dec 2010
    Location
    Luxembourg
    Posts
    132
    Vote Rating
    0
    EAHC-IT is on a distinguished road

      0  

    Default


    Quote Originally Posted by aconran View Post
    We've had one or two reports of similar things. If you search the metadata for this id can you find it? Are you able to share the project with us (you can privately at architect.feedback at sencha.com)?
    I search everywhere in my app folder. I recheck in the metadata folder. I can find several MyComboBox (like "designer|userClassName": "MyComboBox35",) but no MyComboBox38

    Quote Originally Posted by aconran View Post
    Yes, but in general this is against best practices. What if you needed to show two of those components at the same time? This would break down. The best thing that you can do is assign itemId's. itemId's are just like id's except for the fact that they must be unique to their particular container. Id's on the other hand must be unique to the entire global page.
    So if I have "'overall_total" as itemId in two differents active window, there will no conflict.

    Those windows are invoked by different user at different stage as they are part of strict workflow.
    Well, I set both with the same value.

    So for this code:
    Code:
    on_ctrib_cd: function(field, newValue, oldValue, options) {
            Ext.getCmp('ctric_total').setValue(newValue + 
            Ext.getCmp('ctrib_ca').getValue() +
            Ext.getCmp('ctrib_cb').getValue() + 
            Ext.getCmp('ctrib_cc').getValue() + 
            Ext.getCmp('ctrib_ce').getValue());
    
            Ext.getCmp('overall_total').setValue(Ext.getCmp('ctrib_total').getValue()+
            Ext.getCmp('ctria_total').getValue()+
            Ext.getCmp('ctric_total').getValue());
        }
    keep the itemIds and remove the ids propery then change my code as:
    Structure: Window->Form->TabPanel->Panel->Fieldset->NumberField
    Code:
    on_ctrib_cd: function(field, newValue, oldValue, options) 
    var oForm = field.up('form');
    oForm.down('#ctrib_total').setValue(newValue+ 
    oForm.down('#ctrib_bb').getValue()+ 
    oForm.down('#ctrib_bc').getValue()+ 
    oForm.down('#ctrib_bd').getValue()+ 
    oForm.down('#ctrib_be').getValue());
    //oForm.down('#overall_total').setValue(oForm.down('#ctrib_total').getValue()+
    oForm.down('#ctria_total').getValue()+
    oForm.down('#ctric_total').getValue());
        }