Results 1 to 3 of 3

Thread: How do I call?

  1. #1
    Sencha User Riaz's Avatar
    Join Date
    Sep 2010
    Location
    Sydney, Australia
    Posts
    183
    Vote Rating
    1
      0  

    Default How do I call?

    I have following code.

    In jsEntryTimesheet.js
    Code:
     var x = new Ext.form.FormPanel({
    :
     });      
    
    
    Ext.reg("jsEntryTimesheet", x);
    And in jsTimeAndExpenses.js
    Code:
    btnTimesheet = new Ext.Button({
        ui:'round',
        text: 'Timesheet',
        flex: 1,
        handler: function () {
            // need to call "x of jsEntryTimesheet"
            
        }
    
    });
    
    How do I call x object which is in "jsEntryTimesheet.js", when I click on "Timesheet" button?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    Mods need to move this into the Help forum.

    Is the Buttons a child of the FormPanel?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User Eraser's Avatar
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    11
    Answers
    1
    Vote Rating
    0
      0  

    Default

    Hi Riaz,

    if you want to access this button from a function I'd do it this way:
    Code:
    var panel = new Ext.form.formPanel({ });
    [nameOfYouApp].views.formPanel = panel;
    And you can call it this way:
    Code:
    handler : function() {
      var formPanel = [nameOfYourApp].views.formPanel;
    }
    That's all

Similar Threads

  1. Could I create "Call" button that will cause Iphone to make a call?
    By lexer in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 12 Nov 2010, 8:11 AM
  2. Ext.get call
    By febus in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 31 Aug 2009, 2:20 PM
  3. call to dll on Store
    By dtondo in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 29 Apr 2009, 8:58 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

Posting Permissions

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