home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / vrac / paolin.zip / HELP / HELP7.SC < prev   
Text File  |  1993-05-18  |  3KB  |  70 lines

  1. ; ****************************************************************************
  2. ;       TITLE: HELP7.sc 
  3. ;     SESSION: PAOLINI - Providing Custom Help in Paradox 4 Apps
  4. ;   COPYRIGHT: (c) 1993 - Dan Paolini - DataStar International
  5. ; DESCRIPTION: Example of DIALOG BOX-BASED Context-Sensitive Help
  6. ; ****************************************************************************
  7.  
  8. PROC myWaitHandler.n(x,y,z)
  9.    SWITCH
  10.       CASE y["KeyCode"] = -84 :
  11.          IF NOT IsBlank(fieldmsg.y[Table()+"_"+Field()]) THEN
  12.             msContinue!.u("Help for the [" + Field() + "] Field",
  13.                            fieldmsg.y[Table()+"_"+Field()],116,"GRAY",0)
  14.          ELSE
  15.             hsEngine.u(context.a,g.help.y)
  16.          ENDIF
  17.          Return 1
  18.       CASE y["KeyCode"] = -35 :
  19.          hsEngine.u(context.a,g.help.y)
  20.          Return 1
  21.       OTHERWISE :
  22.          Return 2
  23.    ENDSWITCH
  24. ENDPROC
  25.  
  26.    GetColors To g.appcolors.y
  27.    Play "DS4_HELP"
  28.    Play "DS4_UTIL"
  29.    DynArray fieldmsg.y[]
  30.       fieldmsg.y["D\\Super_SuperId"]      = "What the heck is a Supervisor Group ID?  Well, here, we could say."
  31.       fieldmsg.y["D\\Super_SLastName"]    = ""
  32.       fieldmsg.y["D\\Super_SFirstName"]   = ""
  33.       fieldmsg.y["D\\Super_DeptCode"]     = "Press <F1> for Table Lookup"
  34.       fieldmsg.y["D\\Super_MgrId"]        = "Press <F1> for Table Lookup"
  35.       fieldmsg.y["D\\Super_UnitId"]       = "" ;Press <F1> for Table Lookup"
  36.       fieldmsg.y["D\\Super_SuperCode"]    = ""
  37.       fieldmsg.y["D\\Super_Shift"]        = "Enter 1, 2, or 3"
  38.       fieldmsg.y["D\\Super_SEmplId"]      = ""
  39.       fieldmsg.y["D\\Super_DAEmplid"]     = "Press <F1> for Table Lookup"
  40.  
  41.    DynArray g.help.y[]
  42.       g.help.y["MOUSE"] = "ds4HelpMOUSE.u"
  43.       g.help.y["MENUS"] = "ds4HelpMENUS.u"
  44.       g.help.y["KEYS"] = "ds4HelpKEYS.u"
  45.       g.help.y["HELP"] = "ds4HelpHELP.u"
  46.       g.help.y["FIND"] = "ds4HelpFIND.u"
  47.    DynArray g.helpindex.y[]
  48.       g.helpindex.y["MOUSE"] = "Help for Using Your Mouse"
  49.       g.helpindex.y["MENUS"] = "Help Using Application Menus"
  50.       g.helpindex.y["KEYS"] = "Help Using The Keyboard"
  51.       g.helpindex.y["HELP"] = "Help on Using Help"
  52.       g.helpindex.y["FIND"] = "Help on Finding or Locating Data"
  53.  
  54.    context.a = "REP"
  55.  
  56.    View "D\\Super"
  57.    PickForm "2"
  58.    Window Handle Form To h4
  59.    DynArray y4[]
  60.       y4["Maximized"] = True
  61.       y4["HasFrame"] = False
  62.    Window SetAttributes h4 From y4
  63.  
  64.    Message ""
  65.    WAIT Table
  66.       Proc "myWaitHandler.n"
  67.          Key "F2", -84, -35
  68.    ENDWAIT
  69.  
  70.