This project has moved and is read-only. For the latest updates, please go here.

Question about PFC Migration techniques

May 15, 2014 at 7:54 PM
I'm migrating PB apps from PB 6.5 to PB 12.5.2 Classic (initially). For instance, the app manager object contains a reference to n_cst_filesrvwin32 which is not included in the new v12.5 PFC. For migrating apps with this sort of issue, is the idea to manually add the "obsolete" objects back into the PFC pbl, or actually re-write the code to not use the obsolete objects? Just curious what was the thought process behind eliminating these objects from the PFC?
May 15, 2014 at 8:05 PM
Whose application object references n_cst_filesrvwin32? It wouldn't be the one provided as part of PFC. The n_cst_filesrvwin32 object should never be referenced directly. Instead, an instance of n_cst_filesrvwin should be declared and then use the f_setfilesrv function to have the correct subclass.

n_cst_filesrvwin32 was removed from PFC because PowerBuilder 10.0 and later are Unicode only. As a result, n_cst_filesrvwin32 would never be used.

For migration, you should correct the original code in 6.5 and then re-perform the migration.
May 16, 2014 at 2:15 PM
It's not the application object, it's the application MANAGER object ie descendant of n_cst_appmanager/gnv_app. I'm talking about the applications I am migrating, not apps distributed with the PFC. It actually looks like the original programmers tried to do SOMETHING along the lines of what you described, looking at that code in 12.5 it would never had worked (selecting the correct subclass) because they call f_setfilesrv from the n_cst_appmanager_appname/gnv_app constructor event, so all the code in f_setfilesrv is skipped because gnv_app is still null at that point. And there are other problems with that code. It was in effect hard-coded to n_cst_filesrvwin32, guess it worked OK in 6.5. Will fix that in the 12.5 code. Don't have PB 6.5 IDE to work with.

But this is just the first issue that popped up when I tried to implement the 12.5 PFC into the 12.5 code that had migrated from 6.5 with the old PFC. I was mostly looking for envisioned road maps for migrating/implementing the new versions of the PFC, is it best to pull the new PFCs into the app, and then migrating, slugging it out with the issues as they come up? Or is it better to migrate the apps, then replace the PFC pbls, and slug it out with the issues that appear then?
May 16, 2014 at 3:49 PM
I would suggest the latter is the better approach.

"...migrate the apps, then replace the PFC pbls, and slug it out with the issues that appear then.."

Migrating with existing (old) PFC in place should ensure a smooth migration. Only once you've migrated the code consider updating the PFC layer. Otherwise you're trying to deal with both issues simultaneously.