1. #1
    Sencha Premium Member
    Join Date
    Apr 2011
    Posts
    44
    Vote Rating
    1
    Answers
    2
    GFI_SI is on a distinguished road

      0  

    Default Answered: Beta 3 to latest RC : Uncaught TypeError: Cannot call method 'substring' of undefined

    Answered: Beta 3 to latest RC : Uncaught TypeError: Cannot call method 'substring' of undefined


    Anyone know what this is? I get the error

    Code:
    Uncaught TypeError: Cannot call method 'substring' of undefined. sencha-touch-all.js:15
    


    After going from Beta 3 to the RC that was released 2 days ago.

  2. Ok i got it working again

    Set the requires array in the view and in my settings view changed the alias (widget.settings) to xtype (settings).

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


    That is usually due to the xtype not being found.
    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.

  4. #3
    Sencha Premium Member
    Join Date
    Apr 2011
    Posts
    44
    Vote Rating
    1
    Answers
    2
    GFI_SI is on a distinguished road

      0  

    Default


    Is there a list of changed xtypes in the RC? Because literally all I did was replace the old beta 3 sencha touch folder with the new release candidate folder.

  5. #4
    Sencha Premium Member
    Join Date
    Apr 2011
    Posts
    44
    Vote Rating
    1
    Answers
    2
    GFI_SI is on a distinguished road

      0  

    Default


    Something to do with aliases.

    If I replace

    Code:
    { xtype: 'settings', title: 'Settings', iconCls: 'settings' }
    with

    Code:
    { xtype: 'panel', title: 'Settings', iconCls: 'settings' }
    it's fine.

    My settings view class has an alias of 'widget.settings'.

    Is this format deprecated now?

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


    What are you trying to use? Is the file loaded? There shouldn't be any xtypes that were renamed.
    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.

  7. #6
    Sencha Premium Member
    Join Date
    Apr 2011
    Posts
    44
    Vote Rating
    1
    Answers
    2
    GFI_SI is on a distinguished road

      0  

    Default


    It appears as though my views are no longer loading.

  8. #7
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,541
    Vote Rating
    872
    Answers
    3566
    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 GFI_SI View Post
    It appears as though my views are no longer loading.
    How were you requiring them?
    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.

  9. #8
    Sencha Premium Member
    Join Date
    Apr 2011
    Posts
    44
    Vote Rating
    1
    Answers
    2
    GFI_SI is on a distinguished road

      0  

    Default


    In my Viewport controller

    Code:
    views    : ['Login', 'Profile', 'Settings'],
    The viewport view and controller are being loaded however, but they are both set in the app.js.
    Last edited by GFI_SI; 24 Feb 2012 at 11:22 AM. Reason: clarification

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


    In a view, you should be using the requires array. views is for Application and it will be back in Controller.
    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.

  11. #10
    Sencha Premium Member
    Join Date
    Apr 2011
    Posts
    44
    Vote Rating
    1
    Answers
    2
    GFI_SI is on a distinguished road

      0  

    Default


    I'm confused. That's what I have in my controller.

    I still get the error.

Thread Participants: 1