[Gambas-user] IsBlank, version 2.8, is this intended or is this a bug, WEIRD

cwyong1 yongchiaowoei at ...626...
Wed Dec 30 14:14:03 CET 2009


Hi
I got me a login screen with two textbox, username and password 

PUBLIC SUB btnOK_Click()

  WITH txtUserName
    DEBUG IsBlank(txtUserName.TEXT)
    DEBUG IsBlank(txtPassword.TEXT)
    DEBUG txtPassword.TEXT 
    IF IsBlank(.text) = FALSE THEN 
      IF IsBlank(txtPassword.text) = FALSE THEN    
        Module1.pvLoginStatus = TRUE  
        ME.Close(TRUE)
      ELSE 
        WITH txtPassword
          Message("Pls enter your password", "OK")        
          .SelectAll
          .setFocus
        END WITH
      ENDIF
    ELSE 
      Message("Pls enter a user name ", "OK")    
      .SelectAll
      .SetFocus
    ENDIF
  END WITH
  
END

If i entered username and then click on the ok button, isblank will not
treat password textbox as blank but if i at the pasword textbox purposely
press the space bar then click the ok button then isblank will be true and
lastly, my final test is after entering username then at the password
textbox press the tab key, isblank check on password textbox will also
returned false, How come need to purposely press the space bar at the
pasword textbox in order for isblank to work ppl?

-- 
View this message in context: http://old.nabble.com/IsBlank%2C-version-2.8%2C-is-this-intended-or-is-this-a-bug%2C-WEIRD-tp26967348p26967348.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list