Mastering PowerBuilder

HomePrevious Lesson: Signing-in using PFC
Next Lesson: Providing Auto-Sign-in Functionality with no Sign-in Window

Multiple Login Attempts Functionality

A typical application allows the user to try login multiple times. Using PFC, you can specify how many times the user is allowed to try logins. To allow multiple logins, do one of the following:

Extend pfc_PreLogonDlg event in n_cst_pms_appManager and write the following:
// Object: n_cst_pms_appManager 
// Event: pfc_PreLogonDlg
anv_logonattrib.ii_logonattempts = 4

n_cst_logonattrib, which is instantiated in of_LogonDlg(), is sent to pfc_PreLogonDlg event as an argument and the same is passed to w_login as a parameter. pfc_default uses this attribute and decides whether to close the w_login window or keep it open for another attempt depending on the return status from pfc_logon event at application manager.
HomePrevious Lesson: Signing-in using PFC
Next Lesson: Providing Auto-Sign-in Functionality with no Sign-in Window