Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Oct 2011
    Location
    Austin, TX
    Posts
    43
    Vote Rating
    0
    tthai is on a distinguished road

      0  

    Default Unanswered: Confusing using refs in controller config. When to use advance version?

    Unanswered: Confusing using refs in controller config. When to use advance version?


    I am confused when to use the simple one line refs or the more advanced refs in controller to get access to an xtype page.


    Assume I have a page that shows a menu:

    Code:
    Ext.define('Flo.view.SiteMenu', {
        extend: 'Ext.List',
        xtype: 'sitemenu',
        id: 'site-menu',
        
        requires: [
        ],
        config: {
           ......

    Then in my other views, I have a button which on tap, goes to this siteMenu page. This button lives on multiple pages. Also when this siteMenu page is activated via xtype 'sitemenu' it will respond to "activate". That means In my controller I will be doing a this.getSiteMenu();


    This is from my "Home" controller refs:

    Code:
    Ext.define('MyApp.controller.Home', {
        extend: 'Ext.app.Controller',
    
    
        config: {
    
    
            refs: {
                
    
    
                siteMenuBtn: '#home-sitemenu-btn',
                          
                siteMenu: {           /// <-- use this??
                    xtype: 'sitemenu',
                    selector: 'site-menu',
                    autoCreate: true
                },
                
                siteMenu: 'sitemenu'   //<--- OR  use this??
    When and what is main difference?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,519
    Answers
    3447
    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


    You should use the object if you need to use one of the options like autoCreate. If you don't then you can just use the string.
    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
    Oct 2011
    Location
    Austin, TX
    Posts
    43
    Vote Rating
    0
    tthai is on a distinguished road

      0  

    Default


    Hi Mitchell, yes I 'm aware of that. But when would I need to use the autoCreate one?

    I'm having trouble because some of my controllers need to access the same xtype pages and there seems to be some conflicts. I don't have exact code, but is it normal to have the same refs within different controllers?

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,519
    Answers
    3447
    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


    I use autoCreate for my sheet components a lot, it will just create an instance if one is not set on the ref.
    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.

Thread Participants: 1