Results 1 to 3 of 3

Thread: How can call methode from controller

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Location
    France
    Posts
    4

    Default Answered: How can call methode from controller

    hi all, i can access to my function 'showme'
    'this' corresponding at store,so i doesn't work, how catch this function, how call this controller function

    Code:
    init: function () {
    this.control({
    'panelCenter': {
                    render: function (panel) { this.getUsersStore().on('load', function () { this.showme});}
    } 
    }) },
     showme: function () {
            alert('i am in')
        }
    thanks a lot for your help

  2. Hi J4meson,

    Try this code-

    Code:
    init:function(){
        this.control:({
           'panelCenter' : {
                 
    render: function (panel) { this.getUsersStore().on('load', function () { this.showme }, this ); // this is third argument for keep scope
    } }); } , showMe : function(){ alert('i am in'); }
    For more Info see http://www.sencha.com/forum/showthre...249#post853249

  3. #2
    Sencha User sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,335
    Answers
    124

    Default

    Hi J4meson,

    Try this code-

    Code:
    init:function(){
        this.control:({
           'panelCenter' : {
                 
    render: function (panel) { this.getUsersStore().on('load', function () { this.showme }, this ); // this is third argument for keep scope
    } }); } , showMe : function(){ alert('i am in'); }
    For more Info see http://www.sencha.com/forum/showthre...249#post853249
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  4. #3
    Sencha User
    Join Date
    Jan 2012
    Location
    France
    Posts
    4

    Default

    Thanks a lot "sword-it" it works

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •