Results 1 to 3 of 3

Thread: HOW to Call function from a different class

  1. #1
    Sencha User
    Join Date
    Oct 2010
    Location
    Chandigarh (INDIA)
    Posts
    143

    Default HOW to Call function from a different class

    can somebody tell me how to call a function defined in calss A from class B in extjs .plz tell me syntax

  2. #2
    Sencha Premium User StuartAshworth's Avatar
    Join Date
    Feb 2009
    Location
    Glasgow, Scotland
    Posts
    418

    Default

    Code:
    ...
    classBFunction: function(){
          var classA = new ClassA();
    
          classA.myFunction();
    
    }
    ...

  3. #3
    Sencha User
    Join Date
    Aug 2009
    Posts
    480

    Default

    If you need to call it within the class B scope. You can do it this way:

    Code:
           //Inside class B
           ClassA.prototype.myFunction.call(this, [arg1, arg2]);

Similar Threads

  1. How to call a function in the class from a link?
    By safewolf in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 5 Oct 2009, 3:31 AM
  2. One class rather than one which call an other
    By lpastor in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 17 Aug 2009, 1:06 PM
  3. Extended Class with Previous Ajax call
    By marco76 in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 30 Sep 2008, 1:44 AM
  4. Call Ext.extend function from FeedWindow.superclass.constructor.call
    By adelphus in forum Ext 2.x: Help & Discussion
    Replies: 17
    Last Post: 3 Jun 2008, 1:42 AM
  5. Define class on ajax call
    By marco76 in forum Ext 2.x: Help & Discussion
    Replies: 11
    Last Post: 15 Jan 2008, 4:13 AM

Posting Permissions

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