1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    212
    Vote Rating
    3
    bweiler is on a distinguished road

      0  

    Default New PR4 refs documentation missing something?

    New PR4 refs documentation missing something?


    I'm trying to get the new ref structure working and I'm running into some problems. The getRefname structure used to work and now it doesn't even though I'm using the refs as documented in PR4. Am I missing something?

    BTW: The new refs structure is much better than the old way.

    Code:
    refs: {
        mainTitleBar: 'mainview titlebar',
    },
    Code:
    Ext.define('MyApp.view.Main', {
        extend: 'Ext.Container',
        
        config: {
            
            layout: 'card',
            items: [
                {
                    xtype: 'titlebar',
                    docked: 'top',
                    items: [
                        {
                            xtype: 'button',
                            itemId: 'homeButton',
                            iconCls: 'home',
                            iconMask: true,
                            ui: 'plain',
                            align: 'left'
                        },
    
    ...
    Code:
    this.getMainTitleBar().setTitle(this.appTitle);
    
    TypeError: 'undefined' is not an object (evaluating 'this.getMainTitleBar().setTitle')

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,525
    Vote Rating
    872
    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


    It looks like your MyApp.view.Main class doesn't have an xtype assigned to it.
    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 User
    Join Date
    Apr 2011
    Posts
    212
    Vote Rating
    3
    bweiler is on a distinguished road

      0  

    Default


    The xtypes used to be created automatically in previous PR versions. I'm not sure why this would change, but I do like the new ref structure.

    Thanks!

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,525
    Vote Rating
    872
    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


    Quote Originally Posted by bweiler View Post
    The xtypes used to be created automatically in previous PR versions. I'm not sure why this would change, but I do like the new ref structure.

    Thanks!
    You should always define your own xtype.
    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.

  5. #5
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    Quote Originally Posted by bweiler View Post
    The xtypes used to be created automatically in previous PR versions. I'm not sure why this would change, but I do like the new ref structure.

    Thanks!
    Yup, this happened in the old MVC - but we don't think it makes sense and that it is too much magic. You'll need to define your types manually as Mitchell said.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  6. #6
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    9
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Yea this was overlooked in the migration guide, I'll update it
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer