1. #1
    Ext JS Premium Member
    Join Date
    Sep 2011
    Posts
    62
    Vote Rating
    0
    ExtJSNinjas is on a distinguished road

      0  

    Default 4.1 beta layout problem - widthModel.calculated

    4.1 beta layout problem - widthModel.calculated


    One of our layouts is failing. In the layout diagnostics layer, we see the failure within the checkAuthority function because me.target.ownerLayout is true, and widthModel.calculated is false (model.calculated).

    The error is: [E] contextScreen<container> cannot set width.

    Is anyone else seeing issues like this? Thanks.


  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,522
    Vote Rating
    814
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    When you say one of your layouts is it a custom layout? if so, this is one of the things that is said to be affected by the layout changes that had to be made.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,294
    Vote Rating
    121
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    The checkAuthority function is a bit too aggressive here I think and throws an exception. We wanted it that strict for our development, but it is actually not helpful here.

    Could you convert the Ext.Error.raise statement in checkAuthority into:

    PHP Code:
        Ext.log.error(setBy ' should not set ' prop); 
    ?

    That should let you get to the rest of the diagnostic that explains what is happening when you don't load the diagnostic layer.

    Once that runs you should have a lot of stuff in the console which you could analyze and/or post here. I think the format may be hard to deduce unless you've used it a lot.

    Sorry for the hassle.
    Don Griffin
    Ext JS Development Team Lead

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

    "Use the source, Luke!"

  4. #4
    Ext JS Premium Member
    Join Date
    Sep 2011
    Posts
    62
    Vote Rating
    0
    ExtJSNinjas is on a distinguished road

      0  

    Default custom layout

    custom layout


    Yes, it is a custom layout. I made that change in ContextItem.js, thanks.

    I was actually able to get a little further by not adding my configuration object to the items collection before callParent in initComponent. Now, after initComponent, I'm calling the add function on the container.

    However, layout woes are not over. I am seeing multiple errors that look like this now:

    [E] Layout left connected: container-1006<anchor>

    as well as:

    [E] Registering duplicate id (id here) with this manager

    Any thoughts? This is a pretty dynamic system, with many different types of controls dynamically added to the main layout.

  5. #5
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,645
    Vote Rating
    583
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    The latter error indicates components with duplicate id's are being created. I'd suggest eliminating this first since it's likely going to cause other issues during development.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  6. #6
    Ext JS Premium Member
    Join Date
    Sep 2011
    Posts
    62
    Vote Rating
    0
    ExtJSNinjas is on a distinguished road

      0  

    Default


    I will look into this.

    Our code was not changed; it was just running in 4.0.7 without issue. Why would this be breaking in the new version? Thanks.

  7. #7
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,294
    Vote Rating
    121
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    Quote Originally Posted by ExtJSNinjas View Post
    I will look into this.

    Our code was not changed; it was just running in 4.0.7 without issue. Why would this be breaking in the new version? Thanks.
    It's hard to say where a duplicate component id could have come up, but a JS error could have prevented some cleanup from taking place and left a dangling reference.

    How complex is your custom layout? Converting a layout can be simple or difficult depending on what it is doing. I am happy to help if you have questions on this part.
    Don Griffin
    Ext JS Development Team Lead

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

    "Use the source, Luke!"

  8. #8
    Ext JS Premium Member
    Join Date
    Sep 2011
    Posts
    62
    Vote Rating
    0
    ExtJSNinjas is on a distinguished road

      0  

    Default


    It looks like I've been able to resolve most of those types of id related issues with a similar fix to which I've already alluded to: not setting this.items in initComponent, but instead calling add on the container after calling the parent. I am still getting the occasional "should not set width" though.

    I am also getting framework warnings, though, such as:

    [W] BAD! gridcolumn-1108.height set by gridcolumn-1108<columncomponent> and headercontainer-1107<gridcolumn>
    ext-all-dev.js:6570[W] BAD! gridcolumn-1128.height set by gridcolumn-1128<columncomponent> and headercontainer-1107<gridcolumn>
    ext-all-dev.js:6570[W] BAD! gridcolumn-1109.height set by gridcolumn-1109<columncomponent> and headercontainer-1107<gridcolumn>
    ext-all-dev.js:6570[W] BAD! headercontainer-1107.containerChildrenDone set by gridcolumn-1117<columncomponent> and gridcolumn-1109<columncomponent>
    ext-all-dev.js:6570[W] BAD! headercontainer-1107.childrenDone set by gridcolumn-1117<columncomponent> and gridcolumn-1109<columncomponent>

    Is this normal?
    Last edited by ExtJSNinjas; 27 Dec 2011 at 2:16 PM. Reason: removed links

  9. #9
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,294
    Vote Rating
    121
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    Quote Originally Posted by ExtJSNinjas View Post
    [E] Layout left connected: container-1006<anchor>
    This is some missing cleanup that should happen at the end of the layout run ... in this case the 'ownerContext' reference should have been set to null.

    This could happen if the layout run fails, or if there is a JS error during the layout or possibly the duplicate id. Also possibly a bug. I don't think it would effect your initial layout, but might impact subsequent runs.

    Does you layout derive from anchor? Maybe a missing callParent or something.
    Don Griffin
    Ext JS Development Team Lead

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

    "Use the source, Luke!"

  10. #10
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,294
    Vote Rating
    121
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    Quote Originally Posted by ExtJSNinjas View Post
    It looks like I've been able to resolve most of those types of id related issues with a similar fix to which I've already alluded to: not setting this.items in initComponent, but instead calling add on the container after calling the parent. I am still getting the occasional "should not set width" though.

    I am also getting framework warnings, though, such as:

    [W] BAD! gridcolumn-1108.height set by gridcolumn-1108<columncomponent> and headercontainer-1107<gridcolumn>
    ext-all-dev.js:6570[W] BAD! gridcolumn-1128.height set by gridcolumn-1128<columncomponent> and headercontainer-1107<gridcolumn>
    ext-all-dev.js:6570[W] BAD! gridcolumn-1109.height set by gridcolumn-1109<columncomponent> and headercontainer-1107<gridcolumn>
    ext-all-dev.js:6570[W] BAD! headercontainer-1107.containerChildrenDone set by gridcolumn-1117<columncomponent> and gridcolumn-1109<columncomponent>
    ext-all-dev.js:6570[W] BAD! headercontainer-1107.childrenDone set by gridcolumn-1117<columncomponent> and gridcolumn-1109<columncomponent>

    Is this normal?
    The diag layer has warnings "dialed up to 11" as it were, so it is very picky. These are redundant sets to properties, so a wee bug (efficiency most likely) in the layout that "ought not" set the height. The 'childrenDone' is actually a non-issue since that property will be set to true by the last child layout to complete.

    Do you have the layout tree as well? It is quite large for most apps, but it is usually where the root cause is found. Most of the time some value is needed by layout A that should have been calculated by layout B, but for some reason that calculation is either not working or not happening.
    Don Griffin
    Ext JS Development Team Lead

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

    "Use the source, Luke!"