home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / fivos2.zip / TUTOR03.PRG < prev    next >
Text File  |  1994-06-22  |  3KB  |  85 lines

  1. //----------------------------------------------------------------------------//
  2. //            FiveOS2: the CA-Clipper for IBM-OS2 library !!!!!!!!!!          //
  3. //----------------------------------------------------------------------------//
  4.  
  5. // This is a demo of FiveOS2 - the CA-Clipper for IBM-OS2 library
  6. // Here we are using a standard OS2 dialog box to review an indexed DBF !!!
  7.  
  8. // We are already implementing all the Class Hierachies and commands that
  9. // we have designed in our FiveWin: the CA-Clipper for Windows library !!!
  10.  
  11. // After summer, our multiplatform system will be ready:
  12.  
  13. // Five - the complete multiplatform development system for
  14. // the standard bussiness applications compiler CA-Clipper 5:
  15.  
  16. // * FiveWin 1.6 --> already available!!! for Microsoft Windows
  17. // * FiveOS2 1.0 --> soon available for beta-testing. IBM-OS2
  18. // * FiveDos 2.0 --> already available!!! for beta-testing. Ms-DOS
  19.  
  20. // FiveWin is distributed as shareware, as also the other products will
  21. // be distributed in the same way. The same source code: three different
  22. // platforms !!! Look at your favorite and nearest BBS to get a full
  23. // operate version of FiveWin: the CA-Clipper for Windows library.
  24.  
  25. // For more information, please contact:
  26.  
  27. // Antonio Linares Software
  28. // Urb. El Rosario - Avd. Rosario 34-A
  29. // 29600 Marbella - SPAIN
  30. // phone/fax: 34 - 5 - 2834830
  31. // BBS: 34 - 5 - 2213374
  32. // CIS: 100114,1776
  33. // FidoNet: 2:345/201.21
  34.  
  35. #include "FiveOS2.ch"
  36.  
  37. #define CLIENTS  1
  38.  
  39. static oDlg
  40.  
  41. //----------------------------------------------------------------------------//
  42.  
  43. function Main()
  44.  
  45.    local cFirst, cLast
  46.    local oFirst, oLast
  47.    local bRefresh := { || cFirst := Customer->First,;
  48.                           cLast  := Customer->Last,;
  49.                           oFirst:Refresh(), oLast:Refresh() }
  50.  
  51.    USE Customer
  52.    INDEX ON Customer->Last TO CustLast
  53.    SET INDEX TO CustLast
  54.  
  55.    cFirst = Customer->First
  56.    cLast  = Customer->Last
  57.  
  58.    oDlg = TDialog():ReDefine( CLIENTS )    // Create a Dialog from resources
  59.  
  60.    oFirst = TGet():ReDefine( 110, oDlg, bSETGET( cFirst ) )
  61.    oLast  = TGet():ReDefine( 120, oDlg, bSETGET( cLast ) )
  62.  
  63.    TButton():ReDefine( 170, oDlg, { || DbGoTop(), Eval( bRefresh ) } )
  64.  
  65.    TButton():ReDefine( 180, oDlg,{ || DbSkip( -1 ),;
  66.                  If( BoF(), ( MsgInfo( "Begining of file!", "Atention" ),;
  67.                  DbGoTop() ), Eval( bRefresh ) ) } )
  68.  
  69.    TButton():ReDefine( 190, oDlg, { || DbSkip(),;
  70.                  If( EoF(), ( MsgInfo( "End of file!", "Atention" ),;
  71.                  DbGoBottom() ), Eval( bRefresh ) ) } )
  72.  
  73.    TButton():ReDefine( 200, oDlg, { || DbGoBottom(), Eval( bRefresh ) } )
  74.  
  75.    TButton():ReDefine( 2, oDlg, { || If( MsgYesNo( "Do you want to end ?",;
  76.                        "Please, select" ), oDlg:End(),) } )
  77.  
  78.    oDlg:Activate()
  79.  
  80.    USE
  81.  
  82. return nil
  83.  
  84. //----------------------------------------------------------------------------//
  85.