home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / clarion / spd_2104.zip / SPD_2104.MDL < prev   
Text File  |  1990-08-15  |  8KB  |  129 lines

  1. !==============================================================================
  2. ! To make the SUPER_PD model work for 2104, remove *MemForm, *NextForm and
  3.   *NextMemForm from SUPER_PD.MDL.  Then insert the following model procedures
  4. ! in their places.  (Don't worry, the *NextMemForm is supposed to be missing.)
  5. ! This should solve your problem until 2105 arrives.  Don't forget to save a
  6. ! copy of SUPER_PD.MDL before you begin making changes.  If you have any
  7. ! troubles, just give me a call.  Catch you later!
  8. !
  9. ! -=> Mike Hanson <=-
  10. !
  11. ! P.S.:  Remember, this is not a good fix, only a temporary patch.
  12. !==============================================================================
  13.  
  14. *MemForm************************************************************************
  15. !==============================================================================
  16. !                             @ProcName Prodecure
  17. !==============================================================================
  18.  
  19. @ProcName    PROCEDURE
  20.  
  21. Screen       SCREEN       PRE(Scr),@ScreenOpt
  22.                           @Paints
  23.                           @Strings
  24.                           @Variables
  25.                           ENTRY,USE(?First_Field)
  26.                           @Fields
  27.                           @Pause
  28.                           ENTRY,USE(?Last_Field)
  29.                           PAUSE(''),USE(?Pause)  !!Add ?Pause Field
  30.              .
  31.  
  32. Up_Ok        BYTE                                !!Interface Process Switch
  33. Tab_Ok       BYTE                                !!Interface Process Switch
  34.  
  35.   EJECT
  36.   CODE
  37.   OPEN(Screen)                                   !Open The Screen
  38.   SETCURSOR                                      !Turn Off Any Cursor
  39.   Up_Ok=True; Tab_Ok=True                        !!Default Is "Switches On"
  40.   @Setup                                         !Call Setup Procedure
  41.   DISPLAY                                        !Display The Fields
  42.   Action# = Action                               !!Save Action
  43.   LOOP                                           !Loop Thru All The Fields
  44.     Action = Action#                             !!Restore Action
  45.     Mem:Message = CENTER(Mem:Message)            !!Display Action Message
  46.     @Lookups                                     !Display From Other Files
  47.     @Show                                        !Display String Variables
  48.     @Compute                                     !Display Computed Fields
  49.     @Result                                      !Move Resulting Values
  50.     ALERT                                        !Reset Alerted Keys
  51.     ALERT(Accept_Key)                            !Alert Screen Accept Key
  52.     ALERT(Reject_Key)                            !Alert Screen Reject Key
  53.     IF Up_Ok                                     !!If Processing Up_Key
  54.       ALERT(Up_Key)                              !!  Alert It
  55.     .                                            !!.
  56.     IF Tab_Ok                                    !!If Processing Tab Keys
  57.       ALERT(Tab_Key)                             !!  Alert Tab
  58.       ALERT(Shft_Tab)                            !!  Alert Shift-Tab
  59.     .                                            !!.
  60.     @Alert                                       !Alert Hot Key
  61.     ACCEPT                                       !Read A Field
  62.     CASE KEYCODE()                               !!Check Keycodes
  63.     OF Reject_Key                                !!Reject_Key
  64.       BREAK                                      !!  Return
  65.     OF Up_Key OROF Shft_Tab                      !!Up Key And Shift-Tab
  66.       IF FIELD() > ?First_Field                  !!  If Beyond First Field
  67.         UPDATE(?)                                !!    Save Current Field
  68.         SELECT(?-1)                              !!    Goto Previous Field
  69.         ClrKcd                                   !!    Clear Keycode
  70.         CYCLE                                    !!    Cycle For Next Field
  71.       .                                          !!  .
  72.     OF Tab_Key                                   !!Tab Key
  73.       UPDATE(?)                                  !!  Save Current Field
  74.     OF Accept_Key            !!Move & Change     !Accept_Key
  75.       UPDATE                                     !  Move All Fields From Screen
  76.       SELECT(?)                                  !  Start With Current Field
  77.       SELECT                                     !  Edit All Fields
  78.       CYCLE                                      !  Go To Top Of Loop
  79.     .                                            !.
  80.     @CheckHot                                    !On Hot Key, Call Procedure
  81.     IF Action = eView                            !!Show Message For View
  82.       Mem:Message = 'Press <<Enter> to Continue' !!
  83.     .                                            !!
  84.  
  85.     CASE FIELD()                                 !Jump To Field Edit Routine
  86.  
  87.     OF ?First_Field                              !From The First Field
  88.       IF KEYCODE() = Esc_Key THEN BREAK.         !  Return On Esc Key
  89.       IF Action = eView THEN SELECT(?Pause).     !! Goto ?Pause If Viewing
  90.  
  91.     @Edits                                       !Edit Routines Go Here
  92.  
  93.     OF ?Last_Field                               !From The Last Field
  94.       PUT(@Filename2); ChkErr                    !  Update Secondary Files
  95.       PUT(@Filename3); ChkErr                    !  Update Secondary Files
  96.       PUT(@Filename4); ChkErr                    !  Update Secondary Files
  97.       @NextForm                                  !  Call Next Form Procedure
  98.       Action = eDone                             !  Set Action To Complete
  99.       BREAK                                      !  And Return To Caller
  100.  
  101.     OF ?Pause                                    !!From The Pause Field
  102.       IF KEYCODE() = Enter_Key |                 !! On Enter Key
  103.       OR KEYCODE() = Accept_Key                  !! Or Ctrl-Enter Key
  104.         SELECT(?Last_Field)                      !!   Delete The Record
  105.       ELSE                                       !! Otherwise
  106.         BEEP                                     !!   Beep And Ask Again
  107.   . . .
  108.  
  109. *NextForm***********************************************************************
  110.   IF Action <> eDelete                           !If This Is Not A Delete
  111.     IF Action <> eView                           !! If Not Viewing
  112.       Action = eChange                           !    Set Action To Change Mode
  113.     .                                            !! .
  114.     @NextPage                                    !  Call Next Form Procedure
  115.     IF Action <> eDone                           !  If Record Was Not Changed
  116.       IF Action <> eView                         !!   If Not Viewing
  117.         SELECT(?Last_Field - 1)                  !      Select The Last Entry
  118.       ELSE                                       !!   Else
  119.         ClrKcd                                   !!     Clear Keycode
  120.         SELECT(?First_Field)                     !!     Select ?First_Field
  121.       .                                          !!   .
  122. !!!   GET(Table,1)                               !    Reread Original
  123. !!!   Save_Record = @Pre:Record                  !    Save It In The Table
  124. !!!   PUT(Table)                                 !    "
  125.       Action = eChange                           !    Set Logical And Physical
  126. !!!   Disk_Actn# = eChange                       !    Action To Change
  127.       CYCLE                                      !    And Loop Again
  128.   . .
  129.