home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / nShell Prog / Programmer's Guide / 09 Callbacks - Dialogs < prev    next >
Encoding:
Text File  |  1994-09-04  |  1.0 KB  |  45 lines  |  [TEXT/ttxt]

  1. 09 Callbacks - Dialogs
  2. ======================
  3.  
  4. The "ask" and "notify" callbacks allow programmers to easily pop modal dialogs from within nShell commands.
  5.  
  6. NSH_ask
  7. -------
  8.  
  9. int  NSH_ask(Str255 s, int size);
  10.  
  11. PARAMETERS
  12.  
  13.     Str255    s;        address of a prompt string
  14.     int        size;        size flag (0 = small, 1 = medium, 2 = large)
  15.  
  16. RETURNS
  17.  
  18.     1        "yes" button pressed
  19.     2        "no" button pressed
  20.     3        "cancel" button pressed
  21.     others        error code
  22.  
  23. PROCESS
  24.  
  25. This routine displays a three button modal dialog.  The passed string is displayed within that dialog.  The NSH_ask routine waits until the user selects one of the three buttons.  The return value for the function indicates the button pressed.
  26.  
  27. NSH_notify
  28. ----------
  29.  
  30. void NSH_notify(Str255 s, int size);
  31.  
  32. PARAMETERS
  33.  
  34.     Str255    s;        address of a prompt string
  35.     int        size;        size flag (0 = small, 1 = medium, 2 = large)
  36.  
  37. RETURNS
  38.  
  39.     none
  40.  
  41. PROCESS
  42.  
  43. This routine displays a modal dialog.  The passed strings is displayed within that dialog.  The NSH_notify routine waits until the user selects an "OK" button.
  44.  
  45.