1. KIM TRINH
  2. PowerBuilder
  3. Tuesday, 17 May 2022 13:01 PM UTC

I'd like to copy the source code of entire my Power Builder application by EDIT SOURCE each Object (in each Library) , COPY then PASTE code into the TEXT file.

This way takes a lot of time. Is there a better way to copy Power Builder source code into the TEXT file ? Please help.

John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 17 May 2022 15:02 PM UTC
  2. PowerBuilder
  3. # 1

Greetings, Kim -

I don't know if the following will produce what you are looking for:

  1. Open the Library Painter in PB, navigate in the left (treeview) pane and select/highlight one one of your application's pbl's.
  2. Click in the right pane (the list of objects in the pbl), then press Ctrl+A to select all objects.
  3. Click the Export toolbar button. The export dialog window appears. Create a new folder for the exported source files and navigate to the new folder.
  4. Click the Save button (or press Enter) repeatedly... for each object in the pbl. In testing, I was able to export 120 objects in a library in a little over one minute.
  5. Repeat steps 2-4 for the other libraries in your application. You can place all of the exported source files (.sr*) in the same folder if there are no objects having the same name in different pbl's.
  6. Open a command prompt
  7. Navigate to the drive/folder containing the export files.
  8. Use the DOS Type command with redirection to combine all of the exported source files into a single text file:
    For example:   Type *.sr* > C:\exported.txt
  9. Delete the folder containing the separate, exported source files.

You'll end up with every exported source file combined into a single .txt file.

Best regards, John

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 17 May 2022 14:47 PM UTC
  2. PowerBuilder
  3. # 2

Hi Kim;

  Tip: Activate the PB IDE's "Native Source Code" feature and then add your PB App's code to that SCC mechanism. That will automatically export every object classes source code into a text file to the location that you specified for the Native SCC repository.  HTH

Regards ... Chris

Comment
There are no comments made yet.
Brad Mettee Accepted Answer Pending Moderation
  1. Tuesday, 17 May 2022 14:25 PM UTC
  2. PowerBuilder
  3. # 3

Open the Library window, select all objects in a PBL, right click, export. You'll have to save each object individually, but it will prompt for each and you just need to hit enter to save the object by the default name. 

I suggest you create a series of sub-directories (folder) for each PBL so you can keep the source matched.

You could also use the PBNI function to write an app of your own to do it (automated), but it would likely take more time overall than just pressing Enter a few hundred times.

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.