Results 1 to 2 of 2

Thread: Timing issue

  1. #1
    Sencha User
    Join Date
    May 2009
    Posts
    300

    Default Timing issue

    Greetings:

    Pleas consider the following function:
    Code:
    function setFieldMask(pField,pType,pLength){
      Ext.Ajax.request({
        url    :'setfieldmask',
        params :{value:pField.getValue(),type:pType,length:pLength},
        success:function(responseObject){
           pField.setValue(responseObject.responseText);
        }
      })
    };
    I use this code to set a custom mask on fields using the 'change' event like so:
    Code:
    ...
    fieldLabel: 'Last Name',
    name     : 'lastname',
    width     : 140,
    listeners : {
       change: function(){setFieldMask(this,'cap',0);}
    }
    I've notice that an error is thrown (rightfully so) if I change the field but close the window before tabbing through the field because the function setFieldMask can't find the passed field reference. How can I check to see if the field exists before doing a setValue()? Thanks.

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854

    Default

    Please stop reposting - thread moderation is on.

Similar Threads

  1. Timing issue when calling TabPanel.setActiveTab()
    By Ephicient in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 22 Apr 2013, 6:57 PM
  2. Timing issue with record commit
    By catacaustic in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 6 Mar 2008, 11:22 PM
  3. Possible timing issue with Grid
    By ripemeaters in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 26 Mar 2007, 10:23 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
  •