autoupgrader ShowMessages property
Return to Introduction  Previous page  Next page
Applies to
auAutoUpgrader component.  

Declaration
type  
  TauAutoUpgraderShowMessages = set of (mAskUpgrade, mConnLost, mHostUnreachable, mLostFile, mNoInfoFile, mNoUpdateAvailable, mPasswordRequest);  
 
property ShowMessages: TauAutoUpgraderShowMessages;  

Description
The ShowMessages is the set of flags which determines which standard notification messages and request dialogs should or should not be automatically displayed / handled on some AutoUpgrader's events.  
 
These settings let's you to use AutoUpgrader without additional coding of the event handers. Text for messages translated accordingly to settings specified in Language property of Wizard structure.  
 
There is the list of standard flags. Set some of them to True to enable automatic handling and displaying of these notifications, or set to False to disable them. Alternatively you may use numerous events which duplicates standard messages and allows to write custom processing.  
FlagsMeaning  
mAskUpgradewhen mAskUpgrade is True, AutoUpgrader will notify user that newer version is available for download and whether user would like to upgrade it. When mAskUpgrade is False it will try to upgrade the application without confirmation. To hook this event — write the OnBeginUpgrade event handler;  
mConnLostnotifies user about disconnection, when it True. If you'd like to use custom message box — set mConnLost flag to False and write your own OnConnLost event handler;  
mHostUnreachablenotifies user that requested remote host is unreachable. Most common reasons is: (a) user currently disconnected from Internet; (b) remote host is down; (c) wrong hostname in the InfoFileURL property or in the list of Files which should be downloaded and updated. By default this flag is disabled (False). You can catch this event using OnHostUnreachable handler.  
mLostFilethe requested file was not found in the Internet addres specified in remote Info-file. This dialog asks user whether he(she) like to skip lost file and try to continue upgrade without it. Set this flag to False and write OnLostFile event handler to impelement custom dialog or to Abort the upgrading when this happends;  
mNoInfoFilethe file which contains the upgrade information was is inaccessible or was not found by address specified in the InfoFileURL. This flag disabled by default. Use OnNoInfoFile event to make some actions if the Info-file was not found;  
mNoUpdateAvailablenotifies user that update is not available and he(she) currently using most recent version of the application. Disabled by default. Set mNoUpdateAvailable it to True or write OnNoUpdateAvailable event handler;  
mPasswordRequestensures whether AutoUpgrader should automatically asks the username and password, if some file placed in password protected directory. Standard password-request dialog looks like this. To disable it and/or use custom password-request dialog — set mPasswordRequest flag to False and write OnPasswordRequest event handler.  

Recomendations
iiwarning If your program looking for its updates automatically at once the AutoUpgrader detects the Internet connection (AutoCheck = True), we strongly recomend to turn off some standard error messages like mHostUnreachable, mNoInfoFile, mNoUpdate to not confuse user with unexpected error messages. By default these options is turned off.  

See also
InfoFileURL property and InfoFile structure;  
OnConnLost, OnHostUnreachable, OnLostFile, OnNoInfoFile, OnNoUpdateAvailable and OnPasswordRequest events;  
Example of server-based file which contains upgrade information (Info-file).  
File not found.