1. #1
    Sencha User
    Join Date
    Mar 2013
    Posts
    6
    Vote Rating
    0
    mcornetto is on a distinguished road

      0  

    Default Unanswered: Change in define between 407 and 411???

    Unanswered: Change in define between 407 and 411???


    A user control that was being built using an xtype in 407 seems to be ignored once I upgraded to 411. I'm not sure why, but the constructor for the user control is not being called and no errors are being produced to indicate it isn't being found.

    All I've changed is the libraries from 407 to 411 and with a quick perusal of the forums and the readme notes I don't see anything that might be causing this - probably because I'm not actually sure exactly what the problem is.

    Here's what the define looks like.

    PHP Code:
    Ext.define("my.personalPanel", {    
       
    extend"Ext.Panel",     
       
    alias"widget.personalPanel",    
       
    requires: ["Ext.Panel""my.personalDetails"],

       
    constructor: ... 
    and here is the xtype reference that isn't being built:

    PHP Code:
     
    xtype"personalPanel"

    which is added to the items of a viewport.

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,604
    Answers
    543
    Vote Rating
    325
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    You don't need to list the class you're extending in the requires.

    Are you using dynamic loading? Which ExtJS file are you using (it should be one ending with -dev)?

    Do you see the file loaded in the Net/Network tab of your debugger?

    Is the rest of the viewport working?

  3. #3
    Sencha User
    Join Date
    Mar 2013
    Posts
    6
    Vote Rating
    0
    mcornetto is on a distinguished road

      0  

    Default


    I am not using dynamic loading. I am using ext-all-dev.js

    The js file loads fine. There's definitely not an error in the file and the same code works with 407 (100% certain). When I switch to 411, however, the constructor is not called. There is no message indicating why and if ext can't find a class it produces a message - I've had that happen before. So I think it's finding the class, just not calling the constructor for some reason.

    The only panel in the viewport is this panel. However, it does look like viewport is putting html into the output but just wrapper html. Viewport does not throw an error and the only item it has is this panel.

  4. #4
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,604
    Answers
    543
    Vote Rating
    325
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    You need to poke it with a stick, see what falls off.

    Try switching the items from your custom panel to a standard panel:

    Code:
    items: [{
        title: 'Title'
    }]
    If that works, try adding both your item and a standard panel at the same time (with a suitable layout so they'll both show up).

    How are you creating the viewport?

  5. #5
    Sencha User
    Join Date
    Mar 2013
    Posts
    6
    Vote Rating
    0
    mcornetto is on a distinguished road

      0  

    Default


    This was how I was doing the viewport.

    PHP Code:
    Ext.create('Ext.container.Viewport', {
                    
    layout'fit',                items:  _getPanels()
                }); 
    very simple (the _getPanels() returns an array of panels which is actually contains just the one above). I changed this to use a regular panel and it worked. Then I tried using my panel and the regular panel and my panel worked. So, I tried wrapping my panel in a container like so.

    PHP Code:
    Ext.create('Ext.container.Viewport', {

          
    layout'fit',
          
    items: [{xtype"container",  layout"fit"items_getPanels()}]

                }); 
    And it works now. Why this would make it work? No idea.

    However, I did notice I'm having a few other issues with this new version. Notably blank titles are appearing on panels where they weren't before and the accordion layout I use doesn't seem to function at all (not responding to a mouse click). Otherwise things seems to work.

    I really dislike upgrading this product, I doubt any upgrade will be as bad as the one from 3 to 4 (which almost made me stop using this library) but each time I upgrade it seems to be an ordeal that costs me lots of time.

    Thanks.

  6. #6
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,991
    Answers
    464
    Vote Rating
    649
    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


    Using layout "fit" with a number of components doesn't really make sense, because it's meant to size a single child item.

    What type of layout are you trying to achieve?
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  7. #7
    Sencha User
    Join Date
    Mar 2013
    Posts
    6
    Vote Rating
    0
    mcornetto is on a distinguished road

      0  

    Default


    It's only fit because I know there's only one component at this time. However, the delivery mechanism is designed to allow me to add more panels at a later time. In actuality only one will be visible at any time.

Thread Participants: 2

Tags for this Thread