Results 1 to 6 of 6

Thread: WebBaseForm type

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default WebBaseForm type

    Hi,

    In DataFlex 20, in the WebBaseForm.js file you have this part:

    Code:
    initMask : function(){
        df.WebBaseForm.base.initMask.call(this);
    
        if(this._econtrol){
            if(this.peDataType === df.ciTypeText && !this.psMask){
                this._eControl.maxLength = (iVal > 0 ? iVal : 0);
            }else{
                this._eControl.maxLength = 1048576;
            }
        }
    },
    I'm pretty sure that was intended to be:

    Code:
    initMask : function(){
        df.WebBaseForm.base.initMask.call(this);
    
        if(this._eControl){
            if(this.peDataType === df.ciTypeText && !this.psMask){
                this._eControl.maxLength = (iVal > 0 ? iVal : 0);
            }else{
                this._eControl.maxLength = 1048576;
            }
        }
    },
    Oh .. even more interesting... looks like this part of the code was copied from DF19.1 set_piMaxLength and there it has the parameter iVal...
    The parameter iVal doesn't exist in initMask... something fishy with this.


    While I'm at it...

    In WebForm.js the code uses the this._bAutoTabOnUp variable.
    Normally in DAWs code a variable like that gets defined and initialized at the top.
    This is not done, so it might end up being undefined at a moment when you don't expect it to be undefined.

    --
    Wil
    Last edited by wila; 30-Mar-2021 at 03:10 PM. Reason: even more interesting part

Posting Permissions

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