Schultz’s PowerBuilder Notes

Using the PFC’s n_cst_filesrv

The PFC’s contains handy services to work with files saved on your PC or network.  I recently had a need to collect all the files contained in particular folder and any of its subfolders.  The result is this recursive function wf_GetFileNames(). Read more »

May 13, 2009 Posted by rick130 | 3. PFC, Utility Services | , , , , , | 1 Comment

Adding PFC Help to the PowerBuilder Menu

  • In the development environment, right click on the menu and select “Customize”
  • Click on the Custom radio button
  • Drag a new icon to the spot on the menu
  • A modal window pops up:
    • Command line should have the following text: (note the location of the PFC help file on your PC may be different)

winhlp32.exe C:\Program Files\Sybase\PB6\pbpfc60.hlp

or

winhlp32.exe  C:\Program Files\Sybase\PowerBuilder 7.0\Help\pbpfc70.hlp

  • Add Item Text
  • Add Item Microhelp

July 21, 2008 Posted by rick130 | 3. PFC, Utility Services | | No Comments Yet

PFC Security Q and A

How do I enable the PFC security service?

A common place to do this the pfc_postopen event of w_frame

gnv_app.of_SetSecurity(True) //Enable security service

How do I force security to run on a particular object

Read more »

July 21, 2008 Posted by rick130 | 3. PFC, Utility Services | , , , , | No Comments Yet

PFC Security

PFC Security can restrict access to

  • Menu items
  • Graphic objects
  • DataWindow columns

Each object may be enabled/disabled or made invisible

Read more »

July 21, 2008 Posted by rick130 | 3. PFC, Utility Services | | 1 Comment

PFC DateTime Service (n_cst_datetime)

The Date/Time service provides methods to perform calculations with dates.
It includes the following features:

Read more »

July 16, 2008 Posted by rick130 | 3. PFC, Utility Services | , , , , , , , , , , | No Comments Yet

PFC String Service (n_cst_string)

The string service provides support for manipulation of strings.
It includes the following features:
Read more »

July 11, 2008 Posted by rick130 | 3. PFC, Utility Services | , , , , | No Comments Yet

Working with PFC INI Files

Reading from the User INI file

// get list of CSR emp ids from INI file and select these
ls_usr_ini = gnv_app.of_GetUserIniFile( )
ls_csr_string = ProfileString(ls_usr_ini, "CSR", "EMP_ID", "")

Read more »

July 10, 2008 Posted by rick130 | 3. PFC, Application Services | , , , | No Comments Yet

PFC Utility Services

Often overlooked, the PFC has several handy utility services which can make your programming life easier.
Utility Services include the following:

Read more »

July 10, 2008 Posted by rick130 | 3. PFC, Utility Services | | No Comments Yet

PFC DataWindow Service Questions

I get the error “DataWindow is not Updateable” but I am trying to save a different datawindow.

If you have a datawindow which you will not want to update, such as a external source datawindow containing a DDDW, you need to call the function of_SetUpdateable(False) in the dw control’s constructor event

this.of_SetUpdateable ( False )

Read more »

July 10, 2008 Posted by rick130 | 3. PFC, Datawindow Services | , , , , | No Comments Yet