For a Quick Start
\The Sandbox \PB History & Future \New in PB 5 \PFC \For a Quick Start
For a Quick Start
Documentation
Using PFC
Naming
Conventions

¨   To get started with a PFC application:

  1. Access the Application painter.
  2. Define a library list that contains PFC PBLs:
  3. PFCAPSRV.PBL
    PFCDWSRV.PBL
    PFCMAIN.PBL
    PFCWNSRV.PBL
    PFEAPSRV.PBL
    PFEDWSRV.PBL
    PFEMAIN.PBL
    PFEWNSRV.PBL

  4. From the Application painter, display the PowerScript painter and define a global variable, gnv_app, of type n_cst_appmanager.
    1. n_cst_appmanager  gnv_app

    The variable name must be gnv_app
    PFC objects, functions, and events require that you define the application manager as gnv_app, with a data type of n_cst_appmanager (or an n_cst_appmanager descendant).

  5. Add PowerScript code to your application's Open event to create n_cst_appmanager and call the pfc_Open event:
    1. gnv_app = CREATE n_cst_appmanager
      gnv_app.Event pfc_Open(commandline)

  6. Add PowerScript code to your application's Close event to call the pfc_Close event and destroy n_cst_appmanager:
    1. gnv_app.Event pfc_Close( )
      DESTROY n_cst_appmanager

  7. Close the Application painter and save the changes.
  8. Access the User Object painter and open n_cst_appmanager, found in PFEAPSRV.PBL.
  9. Call n_cst_appmanager functions in the Constructor event to initialize instance variables for version, company, and INI file.
  10. Call n_cst_appmanager functions in the pfc_Open event to enable the application services you want.
  11. Add code to the pfc_Open user event to open your application's initial window (typically the frame window), optionally including a call to the of_Splash function, which displays a splash screen.
  12. Save n_cst_appmanager.

Predefined libraries

To see a predefined PFC application running, use one of these applications:

    Sample application. Open the PEAT.PBL application, found in pfc\DemoApp. This provides a small sample application.

    Code examples. Open the EXAMPFC.PBL application, found in pfc\Examples. This provides examples of many PFC functions and services.

    PFC quick-start libraries. Open the QCKSTART.PBL application, found in pfc\qckstart. The functionality provided by the PFC quick-start PBLs is the rough equivalent of what you get from the PowerBuilder GenApp application.

    It's best if your application works with a copy of the PFC quick-start libraries. That way, you'll always have the original copy as a backup.

PFC Tutorial

The PFC User's Guide includes a tutorial that explains the basics of coding a PFC application.

PBL Peeper PB Help PB History
& Future About Us Feedback Site Map

Google
 
Web www.techno-kitten.com
www.sybase.com