home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Prograph Classic 2.6.1 / Examples / Alert 1.1 / Alert ReadMe next >
Encoding:
Text File  |  1995-12-05  |  2.2 KB  |  46 lines  |  [TEXT/ttxt]

  1. Example:                        Alerts
  2. Written by:                    Stephan Mayr, Kopetzky GmbH.
  3. Updated for 2.6.1 by:            The Tech Support Team, Pictorius Incorporated
  4.  
  5. Contents:     Alert.pgs
  6.                    Alert.rsrc
  7.                    Alert ReadMe
  8.  
  9. Needs Prograph Extensions:
  10.                         The default configuration of your 'Prograph Extensions' folder.
  11.  
  12. Needs Libraries to Compile:
  13.                         SCLibrary 2.6
  14.                         Library 2.6
  15.                         Alert.rsrc
  16.  
  17. Standard Methods That Were Modified:
  18.  None
  19.  
  20. New Classes:
  21.  alert
  22.  
  23. Description
  24. -----------
  25. An example file with a class "alert" that allows the use of standard alert boxes within your Prograph Classic program.
  26.  
  27. How to Use in Your Program
  28. -------------------------    
  29. The class "alert" has methods which get the alert message, check for errors while using class "alert" and display the alert box . Selectively load this class into your file and copy/build the needed resources into/in your file using ResEdit.
  30.  
  31. To create a new alert take a look at file "Alert.rsrc". You must supply a 'ALRT' resource and 'DITL' resource (use the existing resources as a template!). In interpreted mode you´ll have to copy this resources into your Prograp Classic file, in compiled mode it´s necessary to attach file "Alert.rsrc" to your Prograph Classic project.
  32.  
  33. To display an alert you have to call method "alert!" with specified alert message, 'ALRT' ID and the type of alert. There´re different possibilities available for specifying an alert message and an alert type, see below.
  34.  
  35. Alert Message: There are three possibilities to specify the alert message. You can specify a string, a 'STR ' resource ID or a list containing the 'STR#' resource ID and the string index.
  36.  
  37. Alert Type: 1 stands for a StopAlert, 2 for a NoteAlert and 3 for a CautionAlert. Specify one of these integers as needed and the proper icon is drawn into your alert box.
  38.  
  39. More Details
  40. ------------
  41. You can specify the alert position (only under System 7.x) and the alert sound when you´re creating the alert resource.
  42.  
  43. The method "error?" uses 'ALRT' ID 400 and 'DITL' ID 400 to display alerts if something went wrong during running the methods "alert!" and "alert text?". MAKE SURE that these resources are AVAILABLE!
  44.  
  45.  
  46.