1. #11
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    52
    Vote Rating
    11
    celticboyone will become famous soon enough

      0  

    Default


    No problem, what are you trying to do? My mentioned of not needing quotes was in reference to the instructions I had given:

    -Put an id of "myButton" on the button (no quotes)

    Sencha does put the quotes on there, but it works and only the ref will now trigger the action. Did you follow the instructions or download that sample I uploaded? Are you just trying to get a reference to a component or something more complicated than that?

  2. #12
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    88
    Vote Rating
    5
    whirling dervish is on a distinguished road

      0  

    Default


    I think I might have misunderstood something here.

    Looking at your button.xda example. Is there anyway you could have used the myButton ref in the control object.

    So rather then,
    Code:
    Ext.define('MyApp.controller.MyController', {    extend: 'Ext.app.Controller',
        config: {
            refs: {
                myButton: '#myButton'
            },
    
    
            control: {
                "button": {
                    tap: 'onButtonTap'
                }
            }
        },//other code omitted
    Something like
    Code:
    Ext.define('MyApp.controller.MyController', {    extend: 'Ext.app.Controller',
        config: {
            refs: {
                myButton: '#myButton'
            },
    
    
            control: {
                "myButton": { // use a ref here
                    tap: 'onButtonTap'
                }
            }
        },

  3. #13
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    52
    Vote Rating
    11
    celticboyone will become famous soon enough

      0  

    Default


    Yes, you can do exactly that - just select the "tap" action for the button and then in the Config panel set the ControlQuery to the id of the button (see attached screenshot). Also attached is a working example that shows myButton which will pop up a dialog when tapped, there's also a second button to show that it does not trigger the same action when tapped

    Does that answer your question?
    Attached Images
    Attached Files

  4. #14
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    88
    Vote Rating
    5
    whirling dervish is on a distinguished road

      1  

    Default


    So I realize you can use a component query in the control section, what I meant was there a way to work through the ref exclusively.

    So if you ref was
    Code:
    refs : { fooRef : "#mybutton" }
    Could you do something like
    Code:
    control { fooRef : { tap: somefunction }}
    I haven't been able to get it to work, but if it doesn't work I don't have a problem using component queries. I would have just been nice to have refs do everything just for the purpose of DRY design.

  5. #15
    Sencha User
    Join Date
    Dec 2011
    Posts
    7
    Vote Rating
    1
    MDSIII is on a distinguished road

      1  

    Default


    I'd love to know the answer to this as well. The framework allows unquoted property names to mean the ref name but it seems there is no provision in Architect to generate the config that way.

    Perhaps the Controller Action section could have a property with a dropdown picker that lists all the defined refs?

  6. #16
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,882
    Vote Rating
    101
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by MDSIII View Post
    I'd love to know the answer to this as well. The framework allows unquoted property names to mean the ref name but it seems there is no provision in Architect to generate the config that way.
    There is no difference between quoted and unquoted references. You can still use this feature of the framework.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  7. #17
    Sencha User
    Join Date
    Dec 2011
    Posts
    7
    Vote Rating
    1
    MDSIII is on a distinguished road

      0  

    Default


    Quote Originally Posted by aconran View Post
    There is no difference between quoted and unquoted references. You can still use this feature of the framework.
    Thank you. A little more searching the forums and a little more care with my ref selector next time.
    My selector wouldn't find the component by itemId alone. It is a child of a container so I had to put the xtype of the container first. Is this right? e.g.

    Code:
        config: {
            refs: {
                taskNavPanel: {
                    autoCreate: true,
                    selector: 'taskpanel',
                    xtype: 'taskpanel'
                },
                taskList: 'taskpanel #taskList'
            },

  8. #18
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,882
    Vote Rating
    101
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Yes, you can either prequalify it via a parent item and/or you could put its xtype#myItemId.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar