For a quick start

To get started with a PFC application:

1 Define a library list that contains PFC PBLs:


2 In the Application painter's Script view, define a global variable, gnv_app, of type n_cst_appmanager.

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).

3 Add PowerScript code to your application's Open event to create n_cst_appmanager and call the pfc_Open event:

gnv_app = CREATE n_cst_appmanager
gnv_app.Event pfc_Open(commandline)

4 Add PowerScript code to your application's Close event to call the pfc_Close event and destroy n_cst_appmanager:

gnv_app.Event pfc_Close( )
DESTROY n_cst_appmanager

5 Add PowerScript code to your application's System Error event to call the pfc_SystemError event:

gnv_app.Event pfc_SystemError( )

6 Close the Application painter and save the changes.

7 Open the user object n_cst_appmanager (found in PFEAPSRV.PBL).

8 Call n_cst_appmanager functions in the Constructor event to initialize instance variables for version, company, and INI file. (You can assign values to these variables in the Properties view)

9 Call n_cst_appmanager functions in the pfc_Open event to enable the application services you want.

10 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.

11 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. This provides a small sample application.

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

PFC Tutorial

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

Other PFC Service Documentation

Use the link below to access other PFC services related documentation:

PFC Services Documentation

Last edited Jun 30, 2014 at 1:44 AM by domangep, version 6


LudwinFeiten Feb 11, 2015 at 2:13 PM 
More documentation in the PFC User's Guide: