1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    2
    Vote Rating
    0
    James Hiscock is on a distinguished road

      0  

    Default Unanswered: Trouble with my own xtypes not being recognised

    Unanswered: Trouble with my own xtypes not being recognised


    I'm trying to populate an items array with xtypes, and I'm getting:

    Code:
    Error: [Ext.createByAlias] Cannot create an instance of unrecognized alias: widget.projects
    QUICK EDIT: Reading over this I realise it says projects, not projectlist, which is in my main tabbar view, and was working prior to me making this thread, I must have broken something while trying to work out why projectlist wasn't being recognised..

    I'm fairly certain I've declared the xtype correctly in one of my views, and I'm also fairly certain I'm using it properly in the items array, but I'm still learning how Ext and Sencha work so I'm probably doing something wrong. If anyone has time to look over this and give me a hand that would be incredible.

    This is in app/view/Projectlist.js

    Code:
    Ext.define("ABCOpen.view.Projectlist", {    extend: 'Ext.List',
        xtype: 'projectlist',
        
        config: {
            store: {xtype: 'projectstore'},
            itemTpl: '<div class="project">{name}</div>',
            grouped: false
        }
    });
    This is in app/view/Projects.js

    Code:
    Ext.define("ABCOpen.view.Projects", {    override: 'Ext.navigation.View',
        xtype: 'projects',
        
        config: {
            title: 'Projects',
            iconCls: 'bookmarks',
            
            items: [
                {
                    xtype: 'container', 
                    title: 'Projects',
                    layout: 'hbox',
                    items: [
                        {
                            xtype: 'projectlist',
                            flex: 1
                        },
                        {
                            xtype: 'panel',
                            html: 'Project Videos',
                            flex: 2
                        }
                    ]
                }
            ]
        }
    });
    and 'Projectlist' is one of the items in my views array in Ext.application({...});

    I think I could continue by using Ext.create() but I'd really prefer to get it working with xtypes, and hopefully get a better understanding in the process.

    Any help is appreciated, thanks!

  2. #2
    Sencha User
    Join Date
    Apr 2012
    Posts
    2
    Vote Rating
    0
    James Hiscock is on a distinguished road

      0  

    Default


    I'm really sorry, please disregard this for now while I work out what's happening with regards to my QUICK EDIT. I'll bump this with an update once I'm back to where I was.

Tags for this Thread