Documentation Peeper

111
PBL Peeper Documentation June 18, 2008 General....................................................................... 4 Warnings............................................................... 4 Step By Step Quick Start Tutorial............................................ 4 User Interface Clues....................................................... 6 Universal Control Behaviour................................................ 6 Technical Information.................................................... 11 Acknowledgments....................................................... 11 PBLs Page................................................................... 12 Source: Treeview........................................................ 12 Source: Text............................................................ 14 Source: Grid............................................................ 15 Selected: Listview....................................................... 15 Browse Page.................................................................. 16 Lists Page.................................................................... 19 Containers. ............................................................ 20 Objects................................................................ 22 Scripts. ............................................................... 25 Controls............................................................... 28 DataWindow Controls.................................................... 30 DataWindow Columns.................................................... 32 External Functions....................................................... 34 Find Page.................................................................... 36 Reports Page. ................................................................ 41 Trace Page................................................................... 44 Trace Call Stack Window................................................. 47 Exports Page. ................................................................ 48 Mass.................................................................. 49 Process Page................................................................. 51 Replace................................................................ 52 Remove. .............................................................. 54 Format................................................................ 56 Other. ................................................................ 57

Transcript of Documentation Peeper

Page 1: Documentation Peeper

PBL Peeper DocumentationJune 18, 2008

General. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Warnings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Step By Step Quick Start Tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4User Interface Clues.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Universal Control Behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Technical Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

PBLs Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Source: Treeview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Source: Text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Source: Grid. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Selected: Listview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Browse Page.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Lists Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Containers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28DataWindow Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30DataWindow Columns.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32External Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Find Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

Reports Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Trace Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Trace Call Stack Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Exports Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Mass. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

Process Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Replace.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Remove. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Other. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

Page 2: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 2 of 111

Compare Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59Object Co mpare. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60App Compare. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61DataWindow Compare.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

Print Options Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

Preferences Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

PSR Viewer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

RTF Viewer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

SQL Formatter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

Script Formatter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

Stringer.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

SQL Parser. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

Command Line Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Application Start. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84PBL Peeper Start. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Tool Windows Start. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86File or Directory Parameter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

Applied PBL Peeper. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88How do I check for memory leaks?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88How do I migrate my application back from PowerBuilder 9 to PowerBuilder 8?.. . . . . 88How do I check that all objects are built based on my class library?. . . . . . . . . . . . . . . . 88How do I ensure that GUI standards have been kept?. . . . . . . . . . . . . . . . . . . . . . . . . . . . 89I want to browse an object, but I don’t know what PBL it’s in.. . . . . . . . . . . . . . . . . . . . 89I want to review all the DataWindow Clicked (or other) scripts.. . . . . . . . . . . . . . . . . . . 89My PowerBuilder application GPFs.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89How do I use PBL Peeper for producing reports on my system?. . . . . . . . . . . . . . . . . . . 90Can I produce system metrics from PBL Peeper?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90I want to move an object to another application, but I don’t know what other objects it

needs.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90I want to find how many times a function is being called during runtime for a certain task.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90How do I see all the instance variables?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91How do I launch PBL Peeper from the source PBLs in Windows Explorer (file

associations)?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

Page 3: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 3 of 111

How do I search / review an object and its ancestors?.. . . . . . . . . . . . . . . . . . . . . . . . . . . 92How do I selectively search and replace?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92Can I use Script or SQL forma tting from the PowerBuilder IDE?. . . . . . . . . . . . . . . . . . 92How do I create a class hierarchy diagram in Visio?.. . . . . . . . . . . . . . . . . . . . . . . . . . . . 92How do I compare specific attributes between versions?. . . . . . . . . . . . . . . . . . . . . . . . . 93How do I search with boolean tests (e.g. “create datastore” AND (NOT “settransobject))?

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

Frequently Asked Questions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94What does PBL Peeper cost?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94My PBL Peeper is a beta version. Where can I find a gold version?.. . . . . . . . . . . . . . . . 94How can I make PBL Peeper run faster?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Can I get the source code for PBL Peeper?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Where do I check for the latest version or news on PBL Peeper?. . . . . . . . . . . . . . . . . . . 95I’ve got a bug to report, comment etc.... Where can I send a note to Sequel?. . . . . . . . . . 95Does PBL Peeper use metaclass functionality?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Why “PBL Peeper”?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95What is that thing on the cat’s head?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

Known Issues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 PowerBuilder Version Conflicts and ORCA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

Tip of the Day List. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

Page 4: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 4 of 111

GeneralThe general purpose of PBL Peeper is to view, analyze and manipulate the exports ofPowerBuilder objects. This was built as a tool for PowerBuilder developers. Its features havebeen driven by my requirements to do my work as a PowerBuilder consultant. I’ve released itwith the hope that it will help other PowerBuilder developers complete their work moreeffectively.

Warnings

IMPORTANT: PBL Peeper is provided as is. No guarantees or warrantees accompany

it. Users of this tool accept responsibility for any damage it does to their source codeand/or computer system and any other potential impacts. Users should be aware thatparts of the tool are intended to modify and/or create source code and/or other fileson the computer system. Computer systems and connected devices should be backedup before using this tool.

Historically, a version of PBL Peeper was tied to a specific version of PowerBuilder. As of PBLPeeper v4, that tie no longer exists. Efforts have been made to not only be compatible with allpast versions of PowerBuilder, but also with future versions of PowerBuilder. Compatibility withPocket PowerBuilder, PocketBuilder and DataWindow.NET also exists.

Step By Step Quick Start Tutorial

• Launch PBL Peeper.• Expand the Workspaces item below PowerBuilder X Apps, then expand the first

workspace beneath this and select the first target in this workspace. This is your currentapplication. Current is defined as the last target that was run within the currentworkspace. Drag it over to the listview on the right. The PBLs in your application appearon the right and all the tabpages become enabled.

• Select the FIND PAGE.• In the field labeled CONTAINING:, type

update• Beneath this:

• select CHARACTER BY CHARACTER

• ensure CASE INSENSITIVE is checked.• ensure WHOLE WORD ONLY is checked.• uncheck INCLUDE QUOTES

• uncheck INCLUDE COMMENTS

• From the menu, select EDIT / ADD ROW.• In the new row, in the field labeled CONTAINING:, type

commit• Beneath this:

• select CHARACTER BY CHARACTER

Page 5: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 5 of 111

• ensure CASE INSENSITIVE is checked.• ensure WHOLE WORD ONLY is checked.• uncheck INCLUDE QUOTES

• uncheck INCLUDE COMMENTS

• In the bottom portion of the FIND PAGE:• check CONTEXT LINES and make the corresponding value 0• set PORTION TYPES to SCRIPTS

• set PAGE BREAKS to NONE

• uncheck DATAWINDOW OUTPUT

• check BOLD MATCHES

• Press the toolbar button for GO (with the VCR style play icon).• Review the list of places where your application does updates and commits.• Close the results page and return to the FIND PAGE.• On the FIND PAGE, check the DATAWINDOW OUTPUT and press GO, repeating the search• Select a row on the output• Find the button on the toolbar with the same icon os the BROWSE PAGE, and click it (or

press CTRL-SHIFT-B) to be moved to the BROWSE PAGE, looking at the same script as thematched item.

• Press CTRL-Q (also the binoculars with the lightening bolt on the toolbar) to activateQuickFind, and enter the first few characters in a DataWindow name. Press Enter.

• From the menu, select VIEW / EXPAND.• Select a DataWindow column within this DataWindow and see the object’s attributes in

the right panel.• Find a window and drill down to select a script.• Click into the right panel, noticing the available toolbar buttons changing.• Press Ctrl-Shift-G and enter a line number to select.• Select a script you know has an ancestor; when you do, the button with the up arrow in

the lower right will appear enabled.• Press the up arrow button to view the ancestor; notice the change in position in the

treeview on the left.• Press the down arrow to return to the original script.• Press the PRINT icon.• Select Print Object’s / Portion’s Contents from the supplied list.• In the SCRIPTS/VARIABLES section of the PRINT OPTIONS DIALOG, check the PRINT

ANCESTORS option, select the Rich Text OUTPUT, and press OK.

Page 6: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 6 of 111

User Interface CluesThere are some general principles to the user interface that help in navigating around the tool:• Watch for microhelp to determine the purpose of a given control. Microhelp is dependent

on the control which has focus.• Watch for enabled/disabled menu and toolbar items to identify available functionality.

Menu and toolbar items are enabled/disabled depending on which control has focus.• Watch the stop/go light on the microhelp bar to watch for process completion.• There is not usually an opportunity to cancel a process once it is started.• Watch the progress meter for process progress.

Universal Control BehaviourSeveral controls have functionality that is consistent throughout the tool. This functionality isdocumented here only.

General

NEW Opens a new sheet. Options are:• PBL Peeper sheet• PSR Viewer• RTF Viewer

CLOSE Closes the current sheet.

EXIT Closes PBL Peeper.

REFRESH APP [CTRL-SHIFT-R]

PBL Peeper parses apart object syntax, and caches the offsetsof parts of each object to improve performance whensubsequently using that object. It also caches relationshipsbetween objects. When objects are changed in PowerBuilderafter the object is indexed, PBL Peeper will fail to recognizethe change and will make mistakes processing that object.When an object changes, you have the option of refreshing theindexing in the entire application.

GO [CTRL-G] Initiates action on the current sheet and tab page.

BROWSER [CTRL-SHIFT-

B]

Switches to the BROWSE PAGE, moving to the current item ifone can be identified on the current page.

Page 7: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 7 of 111

OBJECT FILTER Allows a definition of a subset of objects within the applicationto be processed. This definition is with a DataWindow filterexpression. Fields available for the filter are the same asinitially available from the OBJECT LIST. When an object filteris active, the menu item will be checked and the toolbar buttonwill be depressed. Not all functionality is sensitive to theOBJECT FILTER.

RESET SPLITTERS On occasion, the splitters between controls on windows orpanes have been known to miscalculate and leave one controlhidden behind another. RESET SPLITTERS makes an attempt tocorrect errors by reverting to their original state.

PREFERENCES Opens a window to set user preferences that determine thebehaviour of PBL Peeper.

File/Directory fields Accept drag and drop from Windows Explorer.

DOCUMENTATION Launches Adobe Acrobat with the PBL Peeper documentation.

Option selection Most options are saved between runs of PBL Peeper, so theyare persistent.

Microhelp

Line Number Where appropriate (e.g. a script viewer), indicates the linenumber, row number or page number.

Progress Indicates current task progress as an estimated percentage.(This does not necessarily represent a percentage of actual timefor task completion.)

Busy Indicator Shows a red light when PBL Peeper is busy. Shows a greenlight at other times.

Treeview

COPY [CTRL-C] Copies the text of the currently selected treeview item onto theclipboard.

EXPAND Expands the sub-tree of the currently selected item, includingall contained sub-trees.

COLLAPSE Collapse every expanded treeview item in the treeview,returning the treeview to its original state.

Page 8: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 8 of 111

UP Move up one level in the treeview to the currently selecteditem’s parent.

BACK

FORWARD

A history of movements among treeview items is maintained.These move back and forward along this history list in thesame way these work in an Internet browser.

QUICKFIND An edit field opens in the upper right corner of the treeview.Based on what is typed in this field, current selection moves toan already populated treeview item that matches the enteredstring. The search looks through labels with the followingpriority:• exact match• prefix match• substring matchPressing Enter or losing focus from the edit field will leavefocus on the found item. Pressing Esc will return to the originaltreeview item.

FIRST Moves to and selects the first item in the tree.

PRIOR Moves to and selects the previous item in the tree.

NEXT Moves to and selects the next item in the tree.

LAST Moves to and selects the last item in the tree.

SAVE AS Saves the visible portion of the treeview to an text file, withtabs indenting the levels.

Enter Expands/collapses current selection.

Listview

CLEAR Deletes all items in the listview.

SELECT ALL [CTRL-A] Selects all items in the listview.

Headings Click on listview heading to sort by that data element. Tocreate a compound sort (e.g. PBL, then Object), Ctrl-Click onthe subsequent headings.

Page 9: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 9 of 111

Script/Portion Viewer

SAVE AS Saves the script/portion as a file.

COPY [CTRL-C] Copies the selected part of the script or portion to the clipboard

SELECT ALL [CTRL-A] Selects all of the script or portion

FIND [CTRL-F] Finds a string in the script/portion.

FIND NEXT [F3] Resumes the previous find from the current position using theprevious settings.

GO TO LINE [CTRL-SHIFT-G] Moves to and selects a specified line.

WRAP TEXT Wraps the displayed text to the size of the viewer.

DataWindow

SAVE AS Saves DataWindow data contents to file.

IMPORT Imports a previously saved set of data into the currentDataWindow (only DataWindows used for data entry).

SAVE SYNTAX Saves the current DataWindow syntax to a file so that theDataWindow can be reproduced and saved DataWindowcontents can be imported. Note that some commands changethe structure of the DataWindow, so a saved syntax from aDataWindow may not be able to import all data exported fromthat DataWindow at other times.

PRINT [CTRL-P] Prints DataWindow contents.

PRINT PREVIEW Toggles the print preview mode of the DataWindow.

PAGE SETUP Displays the page setup dialog to select settings for printing.

UNDO [CTRL-Z] Reverses the last data editing, when applicable.

CUT [CTRL-X] Cuts the currently selected text or data to the clipboard.

COPY [CTRL-C] Copies the currently selected text or data to the clipboard.

PASTE [CTRL-V] Pastes into the current field.

Page 10: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 10 of 111

CLEAR Removes selected text from the current field.

SELECT ALL [CTRL-A] Selects all the text in the current field.

BACK

FORWARD

A history of movements among rows is maintained. Thesemove back and forward along this history list in the same waythese work in an Internet browser.

QUICKFIND An edit field opens over the header above the column thatcurrently has focus. Based on what is typed in this field, currentselection moves to the first row where that column matches theentered string. The search looks with the following priority:• exact match• prefix match• substring matchPressing Enter or losing focus from the edit field will leavefocus on the found row. Pressing Esc will return to the originalrow.

QUICKFILTER A filter is created based on the current column and the value init. For example, if a row on the Object List is selected with thecursor in the Type column, QUICKFILTER might create a filter“type=’window’”.

GO TO LINE [CTRL-SHIFT-G] Prompts for a row number, and scrolls to the entered row.

ZOOM Magnification control.

Headings Click on DataWindow heading to sort by that data element.(While not always implemented, it is usually implemented ingrid DataWindows with 3D raised borders on the headings.) Tocreate a compound sort (e.g. by PBL, then by Object), click thefirst heading then Ctrl-Click subsequent headings in sequence.

Rich Text Window

SAVE AS Saves rich text window contents to file as either text or richtext, depending on the file extension.

PRINT [CTRL-P] Prints the rich text window contents.

PRINT PREVIEW Displays a preview of the print.

UNDO [CTRL-Z] Reverses the last data editing, when applicable.

CUT [CTRL-X] Cuts the currently selected text or data to the clipboard.

Page 11: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 11 of 111

COPY [CTRL-C] Copies the currently selected text or data to the clipboard.

PASTE [CTRL-V] Pastes into the document.

CLEAR Removes selected text from the document.

SELECT ALL [CTRL-A] Selects all the text in the document.

FIND [CTRL-F] Finds a string in the rich text window contents.

FIND NEXT [F3] Resumes the previous find from the current position using theprevious settings.

FIRST Moves to the first page.

PRIOR Moves to the previous page.

NEXT Moves to the next page.

LAST Moves to the last page.

Technical InformationWith the exception of a DLL for some string functions written in C for performance, theapplication is entirely written in PowerBuilder, using native PowerBuilder controls. A COMobject built in PowerBuilder 9 is deployed to handle reading of ANSI/DBCS PBLs. PBL Peeperwas built using PowerBuilder Foundation Classes as the cornerstone

AcknowledgmentsTony Cook has supplied C code for string parsing. This has speeded some processes upsignificantly. Roy Kiesler has also helped me through C code issues and has been a source formuch WinAPI information.

Page 12: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 12 of 111

PBLs Page

When a PBL Peeper sheet opens, and no application-selecting command line parameters havebeen supplied, the PBLS PAGE will be selected. The purpose of this page is to select which PBLs(or other object containers, like file system folders containing object exports) the rest of thepages in this sheet in PBL Peeper will work with. The rest of the documentation will refer to thisset of PBLs and/or containers as the “application”, although this set of PBLs and/or containersdoes not have to correspond to a PowerBuilder application’s set of PBLs.

Source: Treeview

When using the TREEVIEW interface, the treeview on the left will have available drive items andPowerBuilder application items. In order to select PBLs for the PBL Peeper application, dragitems from the treeview on the left to the listview on the right. Alternate methods for selecting anitem are pressing Enter and double clicking, although double clicking an item that has childrenwill revert to the native treeview behavior of expanding the item. Selecting an item will bringwith it all PBLs belonging to the item.

Page 13: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 13 of 111

The drive items in the treeview provide to access drives, folders and subsequently PBLs, PBTs(targets) and PBWs (workspaces). Dragging across a PBL will move that individual PBL into thelist of selected PBLs. Dragging across a target or workspace will select all PBLs that belong tothose. If SCAN FOR PB FILES is selected, dragging a folder across will bring across all PBLs in thesubtree beneath that folder, not just PBLs in that folder directly. If SCAN FOR EXPORT FOLDERS isselected, directories containing export files (*.sr*) will be selected, and the folders treated asPBLs. Dragging across a drive will select all PBLs or exports on the drive.

PBL Peeper provides a list of applications from each version of PowerBuilder or compatiblePowerBuilder products it finds on the system. Below each are workspaces, targets orapplications, as appropriate, found in their respective PB.INI files or registry settings, and in turnthe PBLs associated with each. If a PBL can no longer be found, its icon will have a red circlewith a slash through it. Selecting a PBL that is no longer available for the PBL Peeperapplication will result in an warning message. Dragging an application icon across will bring allthe PBLs associated with that application.

Page 14: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 14 of 111

Source: Text

When using the TEXT interface, there is a FILE SPEC field in which to enter a file specification ofPBLs, PBTs or PBWs to transfer. You can build this file specification with the SELECT

DIRECTORY and SELECT FILE buttons. The INCLUDE SUBDIRECTORIES checkbox will indicatewhether you want PBL Peeper to go through the subdirectories beneath the specified directory inorder to find other matches to the file specification. The TRANSFER button will load the specifiedfiles into the listview on the right.

Page 15: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 15 of 111

Source: Grid

The GRID interface provides a list of applications and targets found in all versions. The list hasall the standard amenities provides by other lists, including Sort, Filter, Find, QuickFilter andQuickFind. The list maintains the sort and filter between runs. To select an application or target,double click it or drag it to the listview.

Selected: Listview

The listview on the right shows the list of PBLs or export folders selected. At start up, unless anapplication-selecting command line parameter has been provided, the listview on the right will beempty. See the notes on each interface to see how to select PBLs or export folders. To removePBLs or export folders from PBL Peeper’s application list, select them in the listview and pressDelete. (Note that this does not delete the files from the hard disk; it merely removes them fromthe list.) The listview on the right also accepts PBLs, PBTs, PBWs and folders dragged anddropped from Windows Explorer. The behaviour when a folder is dropped depends on whetherSCAN FOR EXPORT FOLDERS or SCAN FOR PB FILES is selected, as described above.

Page 16: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 16 of 111

Browse Page

The purpose of the browse page is to view what portions make up each object and to view thecontents of those portions. The left panel is a tree of PBLs, objects and their portions. The rightpanel displays the contents of the portion selected in the left panel. The up arrow will move bothpanels to the ancestor of the currently selected object, if one is available. The down arrowoperates similarly to a browser's "Forward" button, returning the panels to the descendant portiononly if the currently displayed portion was arrived at by pressing the ancestor/up arrow button.When an object is selected, its comments appear in the microhelp line. Objects may have asecond icon to qualify its definition (e.g. object u_dw may have both a user object icon and aDataWindow icon).

Available menu items

PRINT [CTRL-P] Print will bring up a selection list of options.

Page 17: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 17 of 111

Printobject/portion’scontents

Will produce a “printout” of the object/portion currentlyselected in the left panel, plus any portions beneath it in the tree(for example, if a PBL is selected, a print out for all objects inthe PBL will be produced). A dialog for print parameters,including the print destination such as Printer or Rich TextWindow, will be produced. See also the PRINT OPTIONS

WINDOW documentation.

Print entire tree Prints the tree (left panel) as currently displayed.

Print tree fromselected item

Prints a subtree of the tree (left panel) from the currentlyselected item.

QUICKFIND The QUICKFIND for this treeview works the same as thestandard QUICKFIND, except that before searching, PBLs arepopulated with object lists if they haven’t been already. Thisensures that all object names are available for QUICKFIND.When focus is on the treeview (left panel), the standard userinterface in the upper right corner appears. When focus is on the right panel, quickfind searches for amatch of the selected text.

Available alternate mouse button menu items – Left panel

FIND...

QuickFind Activates the QUICKFIND interface.

Find in this object Search for one or more strings in the selected object.

Find elsewhere Search for the name of the selected item in other objects.

COPY

Name Copies the name of the current element to the clipboard.

Qualified Name Copies the name, qualified from the PBL name to the currentelement, to the clipboard.

Prototype If the current element is a script, copies the script prototype.

Subtree Copies the text representation of the current subtree to theclipboard

Contents Copies the contents of the object to the clipboard.

Title/Contents Copies the name and the contents of the object, separated bytwo line feeds, to the clipboard.

Page 18: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 18 of 111

GO TO DATA SET COLUMN Jumps from the DataWindow column to the corresponding dataset column.

GO TO DEFAULT DW If a design time default dataobject has been assigned, focus ismoved to that DataWindow object, if found.

PRINT Print will bring up a selection list of options.

Entity Will produce a “printout” of the object/portion currentlyselected in the left panel, plus any portions beneath it in the tree(for example, if a PBL is selected, a print out for all objects inthe PBL will be produced). A dialog for print parameters,including the print destination such as Printer or Rich TextWindow, will be produced. See also the PRINT OPTIONS

WINDOW documentation.

Tree Prints the tree (left panel) as currently displayed.

Subtree Prints a subtree of the tree (left panel) from the currentlyselected item.

Page 19: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 19 of 111

Lists PageThe lists display objects, controls, scripts, DataWindow controls, DataWindow columns orexternal functions and related attributes. Lists can be filtered and sorted. More information oneach entity can be displayed on request. When a list is displayed, its columns are automaticallysized to be wide enough to only show the data contained in the column (see PREFERENCES

WINDOW, Width Style).

To build your own report using the data collected in these pages, use the File / Save As menuitem to save the data, and the File / Save Syntax menu item to save the DataWindow syntax.Importing the saved DataWindow syntax into PowerBuilder will allow you to view the externaldata source format to see how the data is stored. Building another DataWindow with the sameexternal data source definition will allow you to import the saved data.

Available menu items

SORT Displays a dialogue to sort available data. The type of dialogdisplayed is dependent on the selection in the PREFERENCES

WINDOW.

FILTER Displays a dialogue to filter available data. The type of dialogdisplayed is dependent on the selection in the PREFERENCES

WINDOW.

FIND [CTRL-F] Searches from the current point on the list for a substring in aspecified column.

FIND NEXT [F3] Resumes the previous find from the current row using theprevious settings.

OBJECT LIST – SET OBJECT

FILTER FROM LIST

Based on the objects represented in the unfiltered portion of thelist, an Object Filter will be generated. This Object Filter willuse an internal ID to represent the objects.

OBJECT LIST – SET OBJECT

FILTER FROM SELECTED

Based on the objects represented in the rows selected on thelist, an Object Filter will be generated. This Object Filter willuse an internal ID to represent the objects.

Page 20: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 20 of 111

Containers

The Containers list displays a list of PowerBuilder objects’ containers and their attributes. Whilean object container in PowerBuilder is usually a PowerBuilder Library (PBL), in PBL Peeper itcan also be a file system folder containing object exports. An object container count is availableat the bottom of the list.

Fields

CONTAINER The name of the object container.

PATH The fully pathed name of the container

COMMENT The comment of the PBL. (Not applicable to folders

CONTAINER TYPE PBL or folder.

LAST MODIFIED The date of the last modification of the container.

Page 21: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 21 of 111

Available menu items

SAVE AS Saves the contents of the DataWindow to a file.

PRINT [CTRL-P] Prints the list DataWindow on the page.

Page 22: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 22 of 111

Objects

The Objects list displays a list of PowerBuilder objects and their attributes. In this case, object isdefined as a class, and/or an object that one would see in a library list in PowerBuilder’s librarypainter. An object count and sums of numeric columns (e.g. size and source size) of the visibleobjects are available at the bottom of the list.

Fields

OBJECT The name of the object.

PBL The name of the PBL containing the object. The path of thefilename is not included unless it is required to uniquelyidentify the PBL in the current application.

COMMENTS The comments associated with the object.

TYPE The PowerBuilder type of the object (e.g. window).

Page 23: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 23 of 111

DATE TIME The last compiled date / time stamp on the object.

Available menu items

SAVE AS

Save list(DataWindow)

Saves the contents of the DataWindow to a file.

Export selectedobjects

Exports objects corresponding to the selected rows toindividual export files.

PRINT [CTRL-P] Displays a list of print options.

Print selectedobjects' contents

For each object selected produces a full printout in the samestyle as the BROWSE PAGE’S object print. See also the PRINT

OPTIONS WINDOW documentation.

Print list of objects Prints the list DataWindow on the page.

SHOW Displays a list of options to show additional details in the list.

Ancestorinformation

Shows the objects’ ancestor and UserObject type.

Duplicates only / Allobjects

Duplicates only will show only objects where there are two ormore objects with the same name. The next time the SHOW itemis select, the option to reset this filter, All objects, will bedisplayed instead of Duplicates only.

Autoinstantiate Indicates which user objects are autoinstantiate.

Object line count Shows the number of physical lines in the source (export) of anobject

Source Size Shows the size (in characters) of the object export.

DataWindowattributes

Shows the data source type (“Select”, “Procedure”, “External”)and the DataWindow presentation style (“Grid”, “RichText”,etc...).

Find Count... Shows the count of how many times a selected string is foundin each object.

Page 24: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 24 of 111

Attributes... Brings up a dialog to enter a set of attributes. The attributes aredisplayed in the list. If resolving of attributes is requested, theancestor objects will be searched if the attribute is notoverridden in a particular object. If resolving is not requested,only overridden attributes will display.

Page 25: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 25 of 111

Scripts

The Scripts subpage displays a list of scripts that are contained in PowerBuilder objects and thescripts’ attributes.

Fields

SCRIPT The name of the script.

OWNER The name of the control that the script belongs to.

OBJECT The name of the object containing the script.

PBL The name of the PBL containing the object. The path of thefilename is not included unless it is required to uniquelyidentify the PBL in the current application.

DEFINITION The full definition of the script, including parameter list andreturn type.

Page 26: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 26 of 111

SIZE The size of the source of the script, in bytes.

TYPE The type of script: event or function.

SCOPE The scope of the function: public, private or protected.

GHOST When resolve level is set to Scripts (see PREFERENCES

window), indicates whether the function or event is listedbecause there is script in this object for that method (GHOST isNo) or because the function or event is inherited from anancestor (GHOST is Yes).

OWNER TYPE The scripts’ owner’s system type (e.g. window, commandbutton).

Available menu items

PRINT [CTRL-P] Displays a list of print options.

Print selectedscripts' contents

Produces a printout for all scripts selected. See also the PRINT

OPTIONS WINDOW documentation.

Print list of scripts Prints the list DataWindow on the page.

SHOW Displays a list of options to show additional details in the list.

Extended Shows several fields relating to whether or not the scriptextends or overrides an ancestor script. The following are thefields that are shown:

EXTENDED For events, indicates whether the event is extended oroverridden. (This field no longer tries to indicate whether ornot the script has an ancestor.)

SCRIPTED

ANCESTOR

Indicates whether or not the script has an implementedancestor. If the script has only empty ancestor scripts, the fieldindicates “No.”

EVENT TYPE For events, shows whether the event is a system defined eventor a custom defined event.

CUSTOM

DEFINITION

For custom defined events, indicates whether the owner or oneof its ancestors defines the event.

Page 27: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 27 of 111

OWNER HAS

ANCESTOR

Indicates whether or not the object or control that owns thescript has a non-system ancestor. (This is a factor indetermining whether or not a script could potentially have anancestor

Line Count Shows the count of physical lines in the script.

Argument Count Shows the number of arguments the script takes.

Find Count... Searches each script for a specified string or strings and liststhe count of each one in a column.

Page 28: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 28 of 111

Controls

The Controls list displays a list of controls (or other subclasses) that are contained inPowerBuilder objects (or classes) and their attributes. In PBL Peeper 7 or greater, this includesembedded non-visual object subclasses.

Fields

CONTROL The name of the control.

CONTAINERS The names of the controls that contain the given control. Ifmore than one control contains the given control, the controlnames are separated by a ` character.

OBJECT The name of the object containing the control.

Page 29: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 29 of 111

PBL The name of the PBL containing the object. The path of thefilename is not included unless it is required to uniquelyidentify the PBL in the current application.

ANCESTOR The name of the control’s ancestor.

GHOST When resolve level is set to Controls or Scripts (seePREFERENCES window), indicates whether the control is listedbecause the control is either declared or modified in that object(GHOST is No) or because the control is inherited from anancestor (GHOST is Yes).

Available menu items

PRINT [CTRL-P] Displays a list of print options.

Print selectedcontrols' contents

Produces a printout of attributes for all controls selected. Seealso the PRINT OPTIONS WINDOW documentation.

Print list of controls Prints the list DataWindow on the page.

SHOW Displays a list of options to show additional details in the list.

Ancestorinformation

Shows the controls’ object type.

Attributes... Brings up a dialog to enter a set of attributes. The attributes aredisplayed in the list. If resolving of attributes is requested, theancestor controls will be searched if the attribute is notoverridden in a particular object. If resolving is not requested,only overridden attributes will display.

Page 30: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 30 of 111

DataWindow Controls

The DataWindow Controls list displays a list of controls found in all DataWindows and theDataWindow controls’ attributes.

Fields

CONTROL The name of the DataWindow control.

OBJECT The name of the DataWindow.

PBL The name of the PBL containing the control. The path of thefilename is not included unless it is required to uniquelyidentify the PBL in the current application.

TYPE The type of DataWindow control (e.g. column, text, compute).

STYLE The edit style of the control (e.g. checkbox, editmask).

Page 31: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 31 of 111

Available menu items

PRINT [CTRL-P] Prints the list DataWindow on the page.

SHOW Displays a list of options to show additional details in the list.

Data set columnname

For column controls, the name of the column in the data setthat is associated to the control.

Column data type For column controls, the data type in PowerBuildernomenclature of the column associated with the control.

SELECT column For column controls, the expression in the SQL SELECTstatement that represents the column in the data set that isassociated with the control.

Attributes... Brings up a dialog to enter a set of attributes. The attributes aredisplayed in the list. If resolving of attributes is requested, theDataWindow will be created and a Describe() performedagainst it. If resolving is not requested, only attributesexplicitly set in the export will display. Attributes cannot begathered on unnamed DataWindow objects.

Page 32: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 32 of 111

DataWindow Columns

The DataWindow Columns list displays a list of data set columns found in all DataWindows andthe DataWindow columns’ attributes.

Fields

COLUMN NAME The name of the DataWindow column.

OBJECT The name of the DataWindow.

PBL The name of the PBL containing the column. The path of thefilename is not included unless it is required to uniquelyidentify the PBL in the current application.

COL # The sequence within the data set of the column. (Columnnumbers can be used for many DataWindow functions inPowerScript.)

Page 33: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 33 of 111

DB NAME The DBName attribute of the column. PowerBuilder uses thisname internally.

DATA TYPE The column’s data type in PowerBuilder terms.

UPDATEABLE An indicator that shows if the DataWindow includes thecolumn in its Update specifications.

WHERE CLAUSE An indicator that shows if the DataWindow uses the column inbuilding the WHERE clause for UPDATE statements.

KEY An indicator that shows whether or not the DataWindowconsiders the column to be a key column with respect toupdates. When key columns are changed in an existing row, theDataWindow may issue either an UPDATE or a DELETE andINSERT, depending on a setting in the DataWindow.

Available menu items

PRINT [CTRL-P] Prints the list DataWindow on the page.

SHOW Displays a list of options to show additional details in the list.

SELECT column The expression in the SQL SELECT statement that representsthe column in the data. In the case of UNIONs, the columnfrom the first SELECT is shown.

UI Elements Shows the UI columns that are linked to this column as a datasource. (Does not include references to this column inexpressions.)

Attributes... Brings up a dialog to enter a set of attributes. The attributes aredisplayed in the list. If resolving of attributes is requested, theDataWindow will be created and a Describe() performedagainst it. If resolving is not requested, only attributesexplicitly set in the export will display. Attributes cannot begathered on unnamed DataWindow objects.

Page 34: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 34 of 111

External Functions

The External Functions list displays a list of all external functions found in the application.

Fields

FUNCTION The name of the external function.

OBJECT The name of the object containing the external functiondeclaration.

PBL The name of the PBL containing the object. The path of thefilename is not included unless it is required to uniquelyidentify the PBL in the current application.

FUNCTION TYPE Function or subroutine, depending on whether the externalfunction returns a value or not.

RETURN TYPE The data type of the external function’s return value.

Page 35: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 35 of 111

LIBRARY The name of the external library containing the externalfunction.

ALIAS FOR The alias for the external function.

PROTOTYPE The complete external function prototype.

ANSI Flag reflecting the ANSI flag in the Alias clause of theprototype.

Available menu items

PRINT [CTRL-P] Prints the list DataWindow on the page.

Page 36: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 36 of 111

Find Page

The purpose of this page is to find occurrences of one or more strings. The results, withrequested context, are displayed in a rich text window, or in a DataWindow list window. Thepage is made up of two panels, top and bottom. The purpose of the top panel is to enter one ormore items to search for, as well as parameters specific to each individual item. The purpose ofthe bottom panel is to enter overall parameters for the search.

Available menu items

OBJECT FILTER Allows a definition of a subset of objects within the applicationto be searched. This definition is with a DataWindow filterexpression. Fields available for the filter are the same asinitially available from the OBJECT LIST. When an object filteris active, the menu item will be checked and the toolbar buttonwill be depressed.

Page 37: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 37 of 111

Top Panel

Fields

CONTAINING The string to search for.

MATCH TYPE Determines how the CONTAINING field is to be used to identifystring matches in scripts and portions.

Character byCharacter

Matches using the exact contents of the CONTAINING field.

Match() Expression Compares the expression in the CONTAINING field againstphysical lines in the portion, using the Powerscript Match()function. Because of the nature of this option, it will ignoreWhole Word Only, Ignore Comments and Ignore Quotesoptions. Match expression characters for the start and end of astring (^ and $) will be matched to the start and/or end ofphysical lines in the script.

WHOLE WORD ONLY If checked, matches cannot be substring of another word oridentifier. This is defined as the character before and thecharacter after the matched string are not characters that arevalid characters for a PowerBuilder identifier or variable.

CASE INSENSITIVE If checked, matches the CONTAINING field by matching asspecified by the MATCH TYPE, but ignoring case.

Available menu items

ADD ROW Adds a row to the bottom of the list of search criteria. (Note:Order of search items is inconsequential.)

INSERT ROW Inserts a row before the currently selected row of searchcriteria.

DELETE ROW Deletes the currently selected row.

CLEAR ROWS Removes all rows.

Page 38: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 38 of 111

Bottom Panel

Fields

PORTION TYPES Identifies which set of portions are to be searched. This is usedto restrict the search only to portions that are desired, such asscripts only.

Scripts Functions and events only.

Scripts & Variables Functions, events, instance variable declarations, sharedvariable declarations, global variable declarations.

DW Objects DataWindow objects only.

All All objects, all portion types.

INCLUDE COMMENTS Include in output matches that are found in comments.Excluding matches contained in comments slows the search, asthe context of each match has to be evaluated with respect tocomments.

INCLUDE QUOTES Include in output matches that are found in quotes. Excludingmatches contained in quotes slows the search, as the context ofeach match has to be evaluated with respect to quotes.

OUTPUT TYPE Identifies the desired output when a match is found.

Object Name The name of the object, identified with its PBL name, is output.This is the fastest output type, as the object does not have to beindexed when a match is found. If this option is selected, thePORTION TYPES field is ignored and only the existence of thestring within the object is verified.

Script Name The PBL, object and script or portion names are output.

Entire Script The PBL, object, script name and contents of the scripts orportions are output. When DATAWINDOW OUTPUT is checked,this option will default to Context Lines, since DataWindowsdon’t display multi-page scripts well.

Page 39: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 39 of 111

Context Lines The PBL, object, script name and the context lines around thematches are output. When this output type is selected, a fieldfor number of context lines becomes available. Entering zero inthis field will output the code line that the match is found in,including portions of code lines extended with the ampersand(This does not work with matches found in SQL statements).Entering a non-zero number will output the physical linecontaining the match, plus the specified number of physicallines before and after the matching line. This is the slowestoutput type, as the context has to be determined, and multiplecontexts have to be merged if overlapping.

PAGE BREAKS Determines where extra page breaks are inserted into theoutput.

None No extra page breaks are inserted. Only page breaks that therich text edit field puts in because of the volume of text appear.

Between Objects Page breaks are inserted whenever output for a new objectstarts.

Between Scripts Page breaks are inserted whenever output for a new scriptstarts.

BOLD MATCHES When directing output to rich text, found elements that areusing Character By Character will be bolded, if the text isshown. This may slow output processing somewhat, but willmake matches easier to find in the output, especially whenshowing Entire Script or a number of Context Lines.

DATAWINDOW OUTPUT This will direct the output of the Find to a DataWindow, withregular Sort, Filter and Find functionality. In addition, you canlink back to the BROWSE page through the BROWSE toolbarbutton or menu item, and can generate Object Filters based onthe list. Options specific to rich text, like BOLD MATCHES orPAGE BREAKS are ignored.

COUNT OCCURRENCES Checking this will search for all instances of the search targets,and provide an item by item count summary. The level of detailof the counts will depend on the OUTPUT TYPE. WhenDATAWINDOW OUTPUT is checked, and OUTPUT TYPE is ContextLines, this option does not produce any results, although theDATAWINDOW OUTPUT option provides some of its owncounting natively.

Page 40: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 40 of 111

SUPPRESS ZEROES When the count of a search target is zero, the count is notreported when COUNT OCCURRENCES is checked.

Page 41: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 41 of 111

Reports Page

The Reports page will produce one or more reports based on the current application. The reportswill be output to individual rich text or DataWindow windows. To select the report for output,simply check the box. The Go button or menu item will initiate the processing of all the checkedreports. Any parameters that any of the reports required will be prompted for before any reportgeneration starts. The OBJECT FILTER will be respected for reports that specify in the description.

Available Reports

Application Print Prints all the objects in the application. The Print Optionsdialog is provided to define elements of the printed objects andthe print destination. The OBJECT FILTER will be respected ifdefined.

Page 42: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 42 of 111

Comments Extract Dumps all comments from each script and variabledeclarations. Each script starts with a script name title at the topof a new page. The OBJECT FILTER will be respected if defined.

Database Column Usage Lists in a DataWindow all database columns used in anapplication, grouped by table, and indicates where they areused. The OBJECT FILTER will be respected if defined.

DataWindow Object Usage Lists where all DataWindow objects are used. Includes a searchfor simple dynamic assignment. Also lists the DataWindowobjects whose usage can’t be identified.

DataWindow SQL Lists the SQL and the column data types for eachDataWindow. The report will first give you the option ofselecting a database profile. This database profile, if selected,will be used to evaluate the DataWindow internal format ofSQL. The OBJECT FILTER will be respected if defined.

DataWindow to Variables Converts DataWindow data sets to variable definitions. (Thissupports creation of Custom Classes to assign or retrieve rowsof data with dot notation.)

DWObject Expressions Lists all the expressions found for various attributes inDataWindows.

Embedded SQL Extract Lists all the embedded SQL in scripts. The OBJECT FILTER willbe respected if defined.

Inheritance Lists the inheritance trees of windows, menus, nonvisualclasses (user objects) and visual classes (user objects). Thevisual classes tree optionally includes all controls or othersubclasses (such as embedded non-visual) that are inheritedfrom the user object classes. If controls are included in thereport, then a list of system inherited controls are included.

MultiTable Registry Stmts For all DataWindows, builds a set of of_Register() statementsneeded for the PFC MultiTable DataWindow Service. TheOBJECT FILTER will be respected if defined.

Object Cross-Reference Lists objects and the other objects that they reference. Thealgorithm is simply searching for object names. The report alsoproduces a list of objects that are unreferenced. Referencesfrom objects in the unreferenced list are removed from thereferences list, and the list division is re-evaluated. This is donerecursively until the two sets don’t change.

Page 43: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 43 of 111

Orphaned ItemChanged Report columns in ItemChanged events with non-visiblecolumns or columns with no UI presence.

PBR Builder Plus Builds a simple PBR based on assigned attributes (does notdiscover attributes assigned dynamically in scripts). It producesa PBR based on a conservative approach, including all graphicsdetected in all objects and all DataWindows. It also producesscript that will force the inclusion of all windows and userobjects into the executable.

Verify DW SQL Takes all DataWindow SQL and evaluates it against theselected database. If it fails, the error is reported. An optionexists to suppress output for success SQL compiles, showingonly DataWindows that have problem SQL. The OBJECT

FILTER will be respected if defined.

Page 44: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 44 of 111

Trace Page

PowerBuilder provides a tracing tool for determining where your application has executed(search for PBDEBUG in the PowerBuilder online manuals). It produces a text file with a linefor every instruction executed. While this provides invaluable information, the file iscumbersome and awkward to read. The trace page converts this trace file into a tree view in theleft panel, displaying and loading into memory only what you request (these trace files canbecome over 100M in size very quickly, while the portion you want to review may represent avery small portion of that). The right panel displays the script corresponding to the line of thetrace file selected in the tree view. If the selected item in the treeview indicates a line number, aline in the script viewer in the right panel is highlighted.

This page is available without selecting any PBLs. Without selecting PBLs, the trace file isloaded into the treeview but no scripts are displayed.

Loading too many items into the treeview can be a problem and cause PBL Peeper to crash. Thiscan happen, for example, when the problem you are identifying is caused by an infinite loop, and

Page 45: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 45 of 111

the trace file has millions of executed lines for one function. If a threshold (set in PREFERENCES)is passed, a prompt will give you the option of continuing or not. If the load is continued, theprompt will be presented every time that number of additional lines is being loaded. Toadditionally minimize the quantity of information displayed, you can tell PBL Peeper to skip thelines in the DBG file that indicate which individual lines have been executed (see PREFERENCES).

The binary profiling/trace files cannot be read into this page.

Available Menu Items

DELETE ROWS Discards lines from the trace file for further searching. Linescan be discarded either before or after the currently selecteditem. In both cases, evaluation is done relative to the root levelparent of the currently selected item.

FIND [CTRL-F] Searches for a specified substring in the trace file from thecurrently selected item in the trace treeview (left panel). Oncefound, the portion of the trace file required to display the matchare loaded.

FIND NEXT [F3] Resumes the previous find from the current position using theprevious settings.

GO [CTRL-G] or

OPEN

Loads a new trace file

SHOW

Alternate script If available, offers a selection of overloaded scripts (scriptswith the same name) to display in the script viewer (rightpanel) instead of the script PBL Peeper has selected.

Current call stack Shows only the call stack of the currently selected item in thetrace treeview (left panel). See also the TRACE CALL STACK

WINDOW.

Page 46: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 46 of 111

Call stacksmatching...

Prompts for a value to search for. Then, a window will displayall lines containing a match for the entered string, plus the callstacks for those lines. Call stacks that overlap will be merged,giving a clearer picture of where the matching lines wereexecuted relative to each other. See also the TRACE CALL STACK

WINDOW.

Non-standard tracelines

Shows lines that don’t usually show up in trace files. This willfind any unexpected messages. Very rarely, error messages thatdon’t show up anywhere else are logged here.

PRINT [CTRL-P] Shows a list of print options.

Print entire tree Prints the tree.

Print tree fromselected item

Prints a subtree of the tree from the currently selected item.

Page 47: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 47 of 111

Trace Call Stack Window

This window displays the results of SHOW / CURRENT CALL STACK and SHOW / CALL STACKS

MATCHING.... This shows selective portions of the currently loaded trace file, with highlighteditems marked with a red check mark. Double clicking on an item in this window highlights thatitem in the requesting TRACE PAGE, bringing up its script as appropriate.

Controls

COPY Copies text of tree content to clipboard

SAVE AS Saves the contents of the tree to an ASCII text file.

PRINT Prints the contents of the tree on this window.

OK Returns to the TRACE PAGE, highlighting on the TRACE PAGE

the item that is currently selected on this window.

CANCEL Returns to the TRACE PAGE, not changing the highlighted item.

Page 48: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 48 of 111

Exports PageThe first subpage represents what was the original function of what became PBL Peeper. Theopportunity provided by the mass export and import is the power to use standard text orientedtools to make mass changes to objects. The OBJECT FILTER will be respected if defined.

The files saved will be in ANSI or Unicode, depending on the type of PBLs selected. If a mix ofPBLs have been selected, PBL Peeper will prompt for the file type to use.

Import functionality has been disabled until future releases.

Page 49: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 49 of 111

Mass

The purpose of the Mass page is to deal with a full set of exports for the entire application.Export is for producing an export file for all objects in the current application. Import will bedisabled until a future release.

Available menu items

OBJECT FILTER Allows a definition of a subset of objects within the applicationto be exported. This definition is with a DataWindow filterexpression. Fields available for the filter are the same asinitially available from the OBJECT LIST. When an object filteris active, the menu item will be checked and the toolbar buttonwill be depressed.

GO Initiates the export, import, or the export and then the import,as selected.

Page 50: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 50 of 111

Fields

EXPORT Selects exporting of all objects in the current application tofiles.

EXPORT DESTINATION Specifies the base directory for export files. If SUBDIRS is notselected, the export files will be placed in this directory. FilesObjects.txt and PBLs.txt will be placed in this directory, whichare used for subsequent imports.

EXPORT

SYNCHRONIZATION

If populated, object files will be named using the same namesas a previous mass export in the specified directory

USE SERIAL NUMBERS If selected, new objects will be exported with sequentialnumbers for file names instead of using object names (serialnumbers are appended when duplicate names are detected).

SUBDIRS If selected, subdirectories will be created below the EXPORT

DESTINATION using the names of the PBLs. Export files will beplaced in the subdirectory corresponding to the objects PBL.

IMPORT Disabled until a future release.Selects importing of a series of export files into new PBLs.

IMPORT SOURCE Specifies the base directory for import files.

MAKE IMPORT

SOURCE SAME AS

EXPORT DESTINATION

Specifies that the base directory for import files be the same asthe export destination. This is useful when bootstrapping thecurrent application into a new set of PBLs.

IMPORT DESTINATION Specifies the destination directory for the new PBLs.

MAKE IMPORT

DESTINATION SAME

AS IMPORT SOURCE

Specifies that the destination directory for the new PBLs be thesame as the directory containing the source files.

Page 51: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 51 of 111

Process PageThis page and its subpages provide a means of making changes throughout the application.

Available menu items

OBJECT FILTER Allows a definition of a subset of objects within the applicationto be processed. This definition is with a DataWindow filterexpression. Fields available for the filter are the same asinitially available from the OBJECT LIST. When an object filteris active, the menu item will be checked and the toolbar buttonwill be depressed.

GO [CTRL-G] Initiates script processors for all subpages.

Fields

COMPILE Disabled until a future release.When this option is checked, PBL Peeper will try to compilechanged objects into the current set of PBLs. This optionshould be selected only if PBL Peeper’s PowerBuilder versionmatches the version of the PBL’s PowerBuilder down to thebuild.

EXPORT When this option is checked, export files are created forchanged objects. These can be reviewed before importing withPowerBuilder. The files saved will be in ANSI or Unicode,depending on the type of PBLs selected. If a mix of PBLs havebeen selected, PBL Peeper will prompt for the file type to use.

Page 52: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 52 of 111

Replace

The purpose of the Replace subpage is to provide global search and replace functionality.

Fields

SEARCH FOR The string to search for to be replaced.

REPLACE WITH The string to replace the match with.

MATCH CASE If checked, matches the SEARCH FOR text by matching characterfor character, including case.

WHOLE WORD ONLY If checked, matches of SEARCH FOR text cannot be substring ofanother word or identifier. This is defined as the characterbefore and the character after the matched string are notcharacters that are valid characters for a PowerBuilderidentifier or variable.

Page 53: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 53 of 111

IGNORE COMMENTS If checked, ignores matches of SEARCH FOR text that are foundin comments. Excluding matches contained in comments slowsthe search, as the context of each match has to be evaluatedwith respect to comments.

IGNORE QUOTES If checked, ignores matches of SEARCH FOR text that are foundin quotes. Excluding matches contained in quotes slows thesearch, as the context of each match has to be evaluated withrespect to quotes.

SCRIPTS & VARIABLES Search and replace is done against scripts and variabledeclaration portions.

DATAWINDOW SQL Search and replace is done against SQL in DataWindows. If areplace is required, the resultant SQL will be stored in theDataWindow in syntax format, regardless of whether it was ingraphical format before.

UNIVERSAL Extreme caution is advised when using this option.Developers without extensive knowledge of object internalsare discouraged from using this option. This will search andreplace through all portions of all objects.

Page 54: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 54 of 111

Remove

This script processor removes lines of code that contain matches to supplied strings. The removalcan be either with comment markings, or with physical removal from the script.

Fields

REMOVE CODE LINES

CONTAINING

The string to search for a match.

MATCH CASE If checked, matches the CONTAINING text by matching characterfor character, including case.

WHOLE WORD ONLY Matches cannot be substring of another word or identifier. Thisis defined as the character before and the character after thematched string are not characters that are valid characters for aPowerBuilder identifier or variable.

Page 55: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 55 of 111

IGNORE QUOTES Ignore matches that are found in quotes. Excluding matchescontained in quotes slows the search, as the context of eachmatch has to be evaluated with respect to quotes.

CODE LINE REMOVAL

ACTION

Identifies the method to remove code lines that containmatching strings.

Comment Adds comment markings so that the code line will be ignoredby PowerBuilder.

Remove Physically removes the code lines from the scripts.

Page 56: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 56 of 111

Format

This formats scripts with standard indentation using tabs. Other features may be added to thispage in the future.

Page 57: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 57 of 111

Other

This page provides a place for other script processors. To select a script processor, check the boxbeside it.

Available script processors

GetUpdateStatus()Converter

Replaces GetUpdateStatus() parameters with appropriate eventparameters.

Name Unnamed DWControls

Assigns generated names to DataWindow controls that have nonames. Useful when developers forget to assign names, butframeworks require names on all objects.

PBMCustom eventconverter

Replaces PBM_Custom## events with unassigned events, sono parameters are required when using new event callingsyntax.

Page 58: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 58 of 111

SetActionCode(#) converter Replace SetActionCode(##) with RETURN ##

Synchronize DataWindowData Sets

Synchronizes the data types in the DataWindows' data sets withthe database. This is useful if data types in the database havechanged since DataWindows have been created.

Synchronize DataWindowEdit.Limit

Synchronizes any non-zero edit.limit attribute in DataWindowchar columns to the length of the data element.

Page 59: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 59 of 111

Compare PageComparison of PowerBuilder objects cannot be achieved by comparing exports of objects, as thesequence of scripts and controls is not fixed. As a result, comparisons have to be done on aportion by portion basis. This is what the first two comparison pages do. They leverage thefunctionality of the DOS utility FC in order to compare portions.

Common options

SHOW NAMES ONLY When this option is checked, if a difference is recognize, onlythe name of the object/portion is included in the output. If theoption is unchecked, the name is listed as a header, and acomparison is included below.

SCRIPTS/VARIABLES ONLY When checked, only scripts and global, shared and instancevariable portions are compared. This will exclude systemportions and attribute definitions.

IGNORE HORIZONTAL

SPACING

Leading spaces and tabs are stripped off for the comparisonwhen this option is checked.

IGNORE VERTICAL SPACING Blanks lines are removed before the comparison when thisoption is checked.

IGNORE HEADER/PROTOTYPE The function prototype is excluded from the comparison whenthis option is checked.

IGNORE COMMENTS When checked, comments are removed from the portion beforeit is compared.

IGNORE OBJECT WHEN

MODIFIED DATES MATCH

With this option, objects’ modified dates are compared beforeevaluating the objects. If the dates match, no indexing orcomparison is done on the objects.

IGNORE OBJECT WHEN SIZES

MATCH

With this option, objects’ sizes are compared before evaluatingthe objects. If the sizes match, no indexing or comparison isdone on the objects.

Page 60: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 60 of 111

Object Compare

This page compares one object in the current application to another in the current application.After selecting an object from the list, the Select Old and Select New buttons select the two objectto compare. The distinction between old and new determine whether portions are consideredadded or deleted when found in one object and not the other.

Page 61: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 61 of 111

App Compare

This page will compare two versions of an application. Select the old version of the applicationin the same manner as the PBLs page. The output will list any deleted or added objects, controlsor scripts. All other objects will be listed as changed and their contents shown if SHOW NAMES

ONLY is unchecked.

Available menu items

OBJECT FILTER Allows a definition of a subset of objects within the applicationto be compared. This definition is with a DataWindow filterexpression. Fields available for the filter are the same asinitially available from the OBJECT LIST. When an object filteris active, the menu item will be checked and the toolbar buttonwill be depressed.

Page 62: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 62 of 111

DataWindow Compare

This page will compare the data sets of two DataWindows. This is useful in testing the potentialsuccess of functions that share or transfer data sets or portions of data sets, like ShareData() andRowsCopy(). After selecting the two DataWindows from the lists presented after the SELECT

DATAWINDOW # button is pressed, the data sets will be shown side by side. The MATCH columnindicates the degree of the match between parallel elements of the data set. Columns that matchin data type, but not in length, will be labeled with “Length” in the MATCH column, and will behighlighted in yellow (some functions will pass for these discrepancies, but other problems mayarise). Columns that do not match data types will be labeled “Data type”, and will be highlightedin red. Columns that have no match in the other data set will be labeled “Data set length”, andwill be highlighted in red. The display will also include a line at the bottom that describes theOverall Status result of the comparison of the DataWindows, showing the worst problemidentified.

Page 63: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 63 of 111

Print Options Window

This window is used by the various options that “print” objects, portions, or sets of objects. Itdefines the contents and the destination of the output.

Fields

OBJECTS These options will dictate what is printed if an object is beingprinted.

Attributes If checked, prints the object’s attributes that were overriddenwithin this object.

System Portions Shows system portions such as Forward Declarations andGlobal Declarations

Ancestor List If checked, prints the object’s attributes that were defined in theancestor objects.

Tree/Show Controls If checked, produces a tree indicating the contents of the object,including any contained controls. Display of inherited controlsdepends on the resolution setting (see PREFERENCES).

Tree/Show Scripts If checked, includes in the above tree a list of scripts containedin the object. Display of inherited scripts depends on theresolution setting (see PREFERENCES).

Page 64: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 64 of 111

CONTROLS If checked, the output will include all controls and subclasses(such as embedded classes or NVOs), according to the selectedoptions below. If unchecked, controls and scripts will be leftout of the output, with the exception of the object’s tree if thatoption is selected.

Attributes If checked, the output will include the attributes portion of thecontrol indicating all attributes that have been overridden forthe control.

Show Ghosts If the resolve level is high enough, this option will controlwhether ghosted controls (controls inherited but had noattributes overridden within this object) are displayed or not.This checkbox has no effect if the resolve level is not Controlsor Scripts. (See PREFERENCES WINDOW for details.)

Ancestor List If checked, the output includes the list of ancestors for thecontrol. This list will have a higher level of detail if the resolvelevel is either Controls or Scripts. (See PREFERENCES WINDOW

for details.)

Attribute Ancestors If checked, the output lists attributes overridden by ancestors inaddition to attributes overridden within this object.

Tree/Show Controls If checked, produces a tree indicating the contents of thecontrol, including any contained controls. Display of inheritedcontrols depends on the resolution setting (see PREFERENCES).

Tree/Show Scripts If checked, includes in the above tree a list of scripts containedin the control. Display of inherited scripts depends on theresolution setting (see PREFERENCES).

SCRIPTS/VARIABLES If checked, the output will include all scripts according to theselected options below. If unchecked, scripts will be left out ofthe output, with the exception of the object’s or control’s tree ifthose options are selected.

Override/ExtendIndicator

If checked, a line to indicate if the script overrides or extendsits ancestor is included. If the script has no ancestor, nothing isincluded.

Script Ancestors If checked, also outputs the ancestors scripts. The header toeach ancestor script indicates if the script extends or overridesthe previous ancestor.

Page 65: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 65 of 111

Show Ghosts If the resolve level is high enough, this option will controlwhether ghosted scripts (scripts inherited but had no codewithin this object) are displayed or not. This checkbox has noeffect if the resolve level is not Scripts. (See PREFERENCES

WINDOW for details.)

DATAWINDOW OBJECTS

SQL When checked, the SQL will be output for DataWindowobjects. A database connection is required if this option ischecked.

Data Set If checked, the data set will be output. Column names and datatypes are included.

OUTPUT

Target Determines the target of the output.

Rich TextWindow

The standard window which uses the PowerBuilder rich textcontrol, used for output throughout PBL Peeper.

Print Sends the output directly to the current printer, or as specifiedthrough the last call to PRINTER SETUP.

WordPerfect Sends output to a WordPerfect window (requires WordPerfectto be installed).

Word Sends output to a Word window (requires Word to beinstalled).

Base Font Size All variations on font size used within the output are based on apercentage of a base font. Changing this base font size willproportionally change the font used throughout the output.

Page 66: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 66 of 111

Preferences Window

This window is accessed by the Tools / Preferences menu item. This window customizes the wayPBL Peeper behaves. These values are saved between runs of PBL Peeper.

Fields

LONG PROCESSES Determines how PBL Peeper responds to long processes. All ofthe attributes affecting behavior after a long process include theminimum time in seconds the process must take before thebehavior is initiated. For example, the Beep is set and theminimum time is set to 10, PBL Peeper will beep when theprocess is finished if the process takes at least 10 seconds.

Beep After Sounds a standard Windows beep after processes that takemore than the minimum time.

Message After Produces a message box after processes that take more than theminimum time.

Page 67: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 67 of 111

Focus After Brings PBL Peeper to the top of all windows after processesthat take more than the minimum time.

Warning Before In anticipation of a process that ordinarily takes a significantamount of time, a message will be produced, giving the userthe option of canceling the selected action.

SHOW PROGRESS METER Since screen I/O is slow, the progress meter can cause aperformance bottleneck. Unchecking this option will removethe progress meter.

MIN. PROGRESS INCR. Sets the minimal additional percentage a process mustcomplete before updating the progress meter on the status bar.A lower number will provide more user feedback; a highernumber will reduce the performance impact of providing userfeedback.

IDENTIFY ANCESTORS When an item is selected in the Browser Page, if this item ischecked PBL Peeper will immediately try to determine if anancestor exists, and disable the ancestor button immediately. Ifthis item is unchecked, if PBL Peeper doesn’t already know ifan ancestor exists, the button will remain enabled until the userclicks it. If the user clicks the ancestor button when no ancestorexists, the button will become disabled and there will be nochange in the display.

TRACE LOAD LIMIT When this value is non-zero, the trace page keeps track of howmany children it is loading to a single trace item. If the value isx, for every x children, the user is prompted to continue or not.This avoids loading traces of infinite loops and running out ofmemory.

SKIP TRACE LINES If checked, the TRACE page will skip over numbered lineexecutions when loading the trace file.

SORT STYLE For any window that uses the DataWindow sort functionality(e.g. the List subpages), determines which style of sort dialog issupplied. The list corresponds to those made available by PFC.

PB’s Sort The sort window that PowerBuilder provides.

Drag & Drop A simple drag and drop style sort window.

Simple A window that allows selection with a drop down of only onecolumn to sort by.

Page 68: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 68 of 111

DropDownListBox A window that allows selection with drop downs of one ormore columns to sort by.

FILTER STYLE For any window that uses the DataWindow filter functionality(e.g. the List subpages), determines which style of filter dialogis supplied. The list corresponds to those made available byPFC.

PB’s Filter The filter window that PowerBuilder provides.

Extended A filter window that provides a tabbed interface to help buildthe filter expression.

Simple A filter window that builds expressions with drop down lists.

WIDTH STYLE For any grid DataWindow, PBL Peeper adjusts the width of thecolumns so that none of the data is hidden. The differentalgorithms produce differing accuracies with differingperformance.

None Does no column width adjustments.

Express Reviews all rows where the column being adjusted contains avalue that matches the maximum number of characters in afield.

Exhaustive Reviews the width of all rows for the column being adjusted.

Simple Reviews the width of only the first row that contains a valuethat matches the maximum number of characters in a field.

Margined Reviews all rows where the column being adjusted contains avalue that is within 15% of the maximum number of charactersin a field.

TIP OF THE DAY If checked, displays a tip on the operation of PBL Peeper onevery splash window.

Min Time Normally, PBL Peeper’s splash window stays open until it isfinished intial processing. This will force PBL Peeper to stayopen for a minimum time (in seconds), so that the tip can beread.

Page 69: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 69 of 111

RESOLVE STYLE Determines to what degree an object’s ancestry influences itsrepresentation within PBL Peeper and in the Browser Page.Change in the Resolve Style makes significant changes in themeans PBL Peeper can be used and in performance. Whenportions are ghosted in the Browser, they appear with a whitemask.

None Only portions that are represented in the export of an object arerepresented. This is the fastest option.

Orphans When portions are identified whose parent tree is not clearlyidentified by the portions within the object, ancestors areindexed until a representation of the parent tree can beidentified. Ghosted portions are added to the representation ofthe object to clarify its relevance to the object. (E.g. Ofteninherited menus will contain scripted Clicked events, whiletheir parent menu items will not be referenced at all. In thebrowser, a series of unparented Clicked events is ambiguous.Resolving orphans would create ghosts of menu items to parentall the Clicked events.)

Controls All controls inherited from ancestors are ghosted.

Scripts All controls and scripts from ancestors are ghosted.

LIST GHOSTS Include ghosted portions in the List Page. (See RESOLVE STYLE)

RESOLVE DWS If one of the sub-options is checked, for any control that has aDataWindow object associated with it (DataWindow control,embedded datastore, drop-down DataWindow, nested report),elements of the default DataWindow (the DataWindowassigned at design time) are ghosted below the control.

DW Controls Control or user interface elements are ghosted belowDataWindow associated controls. As in a DataWindow, theyare grouped by band.

DW Table DataWindow table or data set elements are ghosted belowDataWindow associated controls.

Page 70: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 70 of 111

DERIVE SYSTEM EVENT

DEFNS

A bug up to PowerBuilder 7.0.3 causes PBL Peeper to blow upwhen exiting if metaclass objects are used to access certainScriptDefinitions. This functionality was used to load fullsystem event definitions, such as “Event retrieveend (longrowcount) returns integer” instead of “Event retrieveend”.Probably the main benefit of this is for documentationgeneration. If you don’t use this functionality, turn it off andthe failure when leaving PBL Peeper should go away.

KEEP OBJECT SOURCE IN

MEMORY

By default, to keep memory usage down, PBL Peeper typicallydoes not keep source loaded in memory. As a result, the sourcehas to be read in from the disk every time it is needed.Checking this option improves performance, at the cost ofmemory usage.

Page 71: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 71 of 111

PSR Viewer

The purpose of this sheet is to view PSR or SRD files, or to view DataWindow based outputfrom a PBL Peeper function.

Available menu items

OPEN Opens a Powersoft Report (PSR) or DataWindow export (SRD)file into the PSR viewer sheet.

SAVE AS Saves DataWindow data contents to file.

IMPORT Imports a previously saved set of data into the currentDataWindow (only DataWindows used for data entry).

Page 72: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 72 of 111

SAVE SYNTAX Saves the current DataWindow syntax to a file so that theDataWindow can be reproduced and saved DataWindowcontents can be imported.

PRINT [CTRL-P] Prints DataWindow contents.

PRINT PREVIEW Toggles the print preview mode of the DataWindow.

PAGE SETUP Displays the page setup dialog to select settings for printing.

UNDO [CTRL-Z] Reverses the last data editing, when applicable.

CUT [CTRL-X] Cuts the currently selected text or data to the clipboard.

COPY [CTRL-C] Copies the currently selected text or data to the clipboard.

PASTE [CTRL-V] Pastes into the current field.

CLEAR Removes selected text from the current field.

SELECT ALL [CTRL-A] Selects all the text in the current field.

BACK

FORWARD

A history of movements among rows is maintained. Thesemove back and forward along this history list in the same waythese work in an Internet browser.

QUICKFIND An edit field opens over the header above the column thatcurrently has focus. Based on what is typed in this field, currentselection moves to the first row where that column matches theentered string. The search looks with the following priority:• exact match• prefix match• substring matchPressing Enter or losing focus from the edit field will leavefocus on the found row. Pressing Esc will return to the originalrow.

GO TO LINE [CTRL-SHIFT-G] Prompts for a row number, and scrolls to the entered row.

ZOOM Magnification control.

OBJECT LIST – SET OBJECT

FILTER FROM LIST

Based on the objects represented in the unfiltered portion of thelist, an Object Filter will be generated. This Object Filter willuse an internal ID to represent the objects. This is onlyavailable when links back to a PBL Peeper sheet have beenprovided.

Page 73: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 73 of 111

OBJECT LIST – SET OBJECT

FILTER FROM SELECTED

Based on the objects represented in the rows selected on thelist, an Object Filter will be generated. This Object Filter willuse an internal ID to represent the objects. This is onlyavailable when links back to a PBL Peeper sheet have beenprovided.

Page 74: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 74 of 111

RTF Viewer

The purpose of this sheet is to view and edit rich text and text files, or to view textual outputfrom PBL Peeper functions.

Available menu items

OPEN Opens a text or rich text file into the RTF sheet.

SAVE AS Saves rich text window contents to file as either text or richtext, depending on the file extension.

PRINT [CTRL-P] Prints the rich text window contents.

PRINT PREVIEW Displays a preview of the print.

UNDO [CTRL-Z] Reverses the last data editing, when applicable.

Page 75: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 75 of 111

CUT [CTRL-X] Cuts the currently selected text to the clipboard.

COPY [CTRL-C] Copies the currently selected text to the clipboard.

COPY RICHTEXT Copies the currently selected text in both text and rich textformats to the clipboard.

PASTE [CTRL-V] Pastes into the document.

CLEAR Removes selected text from the document.

SELECT ALL [CTRL-A] Selects all the text in the document.

FIND [CTRL-F] Finds a string in the rich text window contents.

FIND NEXT [F3] Resumes the previous find from the current position using theprevious settings.

FIRST Moves to the first page.

PRIOR Moves to the previous page.

NEXT Moves to the next page.

LAST Moves to the last page.

Page 76: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 76 of 111

SQL Formatter

The purpose of this sheet is to format SQL into a more readable format. This is useful for readinggenerated SQL, such as SQL passed into the SQLPreview events. It is available as a menu itemunder the Tools menu.

Fields

SOURCE SQL The data entry field where the unformatted SQL can be pastedor entered.

FORMATTED SQL The field where the formatted SQL is displayed.

Page 77: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 77 of 111

Controls

CONVERT Formats the SQL and displays it.

CLIPBOARD Formats the SQL, displays it and places a copy on theclipboard.

Available menu items

SAVE AS Saves results to a text file.

PRINT [CTRL-P] Prints the results.

UNDO [CTRL-Z] Reverses the last data editing, when applicable.

CUT [CTRL-X] Cuts the currently selected text to the clipboard.

COPY [CTRL-C] Copies the currently selected text to the clipboard.

PASTE [CTRL-V] Pastes into the source.

CLEAR Removes selected text from the source.

SELECT ALL [CTRL-A] Selects all the text.

Page 78: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 78 of 111

Script Formatter

The purpose of this sheet is to format PowerScript scripts into a more readable format. It isavailable as a menu item under the Tools menu.

Fields

SOURCE SCRIPT The data entry field where the unformatted script can be pastedor entered.

FORMATTED SCRIPT The field where the formatted script is displayed.

Page 79: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 79 of 111

Controls

CONVERT Formats the script and displays it.

CLIPBOARD Formats the script, displays it and places a copy on theclipboard.

Available menu items

SAVE AS Saves results to a text file.

PRINT [CTRL-P] Prints the results.

UNDO [CTRL-Z] Reverses the last data editing, when applicable.

CUT [CTRL-X] Cuts the currently selected text to the clipboard.

COPY [CTRL-C] Copies the currently selected text to the clipboard.

PASTE [CTRL-V] Pastes into the document.

CLEAR Removes selected text from the document.

SELECT ALL [CTRL-A] Selects all the text in the document.

Page 80: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 80 of 111

Stringer

The purpose of this sheet is to format a string into a quoted string that can be assigned to a stringvariable.

Fields

SOURCE STRING The data entry field where the unformatted SQL can be pastedor entered.

FORMATTED STRING The field where the formatted SQL is displayed.

Page 81: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 81 of 111

Controls

CONVERT STYLE Determines how individual lines are to be dealt with beforethey are quoted.

As Is Leading and trailing whitespace is left in tact.

Trimmed Leading and trailing whitespace is removed.

WRAPPED TO CONTROL If checked, wraps the string to the size of the control.

SKIP BLANK LINES If checked, does not include blank lines in the string.

APPEND CHARACTER Determines which character is appended to the string before itis quoted.

None No character is appended.

Blank A blank is appended.

~r~n A carriage return and line feed (or end of line) are appended.

CONVERT Formats the string and displays it.

CLIPBOARD Formats the string, displays it and places a copy on theclipboard.

Available menu items

SAVE AS Saves results to a text file.

PRINT [CTRL-P] Prints the results.

UNDO [CTRL-Z] Reverses the last data editing, when applicable.

CUT [CTRL-X] Cuts the currently selected text to the clipboard.

COPY [CTRL-C] Copies the currently selected text to the clipboard.

PASTE [CTRL-V] Pastes into the document.

CLEAR Removes selected text from the document.

SELECT ALL [CTRL-A] Selects all the text in the document.

Page 82: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 82 of 111

SQL Parser

The purpose of this sheet is to parse a given SQL statement and identify the tables and columnsused. Sets of tables and columns can be accumulated for several consecutively processed SQLstatements. It is available as a menu item under the Tools menu.

Fields

SOURCE SQL The data entry field where the SQL statement can be pasted orentered.

TABLES/COLUMNS The list where the tables and columns are displayed.

Page 83: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 83 of 111

Controls

PARSE Parses the SQL and displays the resulting list of tables andcolumns.

REPLACE When PARSE is started, the existing elements of theTABLES/COLUMNS list is removed.

APPEND When PARSE is started, the results are added to the existing listin the TABLE/COLUMNS control.

Available menu items

SAVE AS Saves results of the TABLES/COLUMNS list.

PRINT [CTRL-P] Prints the results.

UNDO [CTRL-Z] Reverses the last data editing, when applicable.

CUT [CTRL-X] Cuts the currently selected text to the clipboard.

COPY [CTRL-C] Copies the currently selected text to the clipboard.

PASTE [CTRL-V] Pastes into the document.

CLEAR Removes selected text from the document.

SELECT ALL [CTRL-A] Selects all the text in the document.

Page 84: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 84 of 111

Command Line Parameters

Command line parameters can be supplied to modify PBL Peeper’s start up behaviour.Command line parameters can be supplied via Windows Run command dialog or via shortcutproperties. Please see Windows documentation for full information on how to supplyapplications with command line parameters. See the Applied PBL Peeper chapter for details onhow to use these parameters to launch PBL Peeper from Windows Explorer.

Application Start

/WIN:InitWindow Automatically loads the specified window on start. Defaultvalue is PBLPeeper when this parameter is not specified, orwhen an incorrect value is supplied to this parameter.Acceptable values are:

PBLPeeperSQLFormatterSQLParserScriptFormatterStringerPSRViewerRTFViewerNone

PBL Peeper Start“Application” Contents

/PBVER:x Identifies the “current” version of PowerBuilder to be used todetermine the application identify. If omitted, the latest versionof PowerBuilder found will be used as the current version.

/CURRENT[:{WORKSPACE |TARGET |APPLICATION}]A

Automatically loads the current application, target orworkspace as defined by PowerBuilder for the currentPowerBuilder version. When not specified, the parameterdefaults to the current application. For PowerBuilder 8 andforward, when the application is specified, the last runapplication in the current workspace is loaded. Automaticallyswitches to the Browse page, indexing PBL directories, unless/INITPAGE is specified.

Page 85: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 85 of 111

/APP:xyz Loads the application with the name. If more than oneA

application with the name xyz are defined in the PB.INI file, theone that is either current or last defined is used. Searches thePB.INI of the current version of PowerBuilder only. InPowerBuilder 8 and forward, appropriate registry entries,workspace and target files are searched. Automaticallyswitches to the Browse page, indexing PBL directories, unless/INITPAGE is specified.

/TARGET:TargetFileNameA

Loads the application associated with target file. Automaticallyswitches to the Browse page, indexing PBL directories, unless/INITPAGE is specified.

/WORKSPACE:WorkspaceFileNameA

Loads all PowerBuilder applications associated with workspacefile. Automatically switches to the Browse page, indexing PBLdirectories, unless /INITPAGE is specified.

/PBL:PBLName1[,PBLName2...]A

Loads the PBL or PBLs listed. Wildcards are accepted. Thesupplied PBL names should be fully pathed. Automaticallyswitches to the Browse page, indexing PBL directories, unless/INITPAGE is specified.

/PBLAPP:PBLName Loads the first application found that has the supplied PBL inA

its library list. Searches the PB.INI of the current version ofPowerBuilder only. In PowerBuilder 8 and forward,appropriate registry entries, workspace and target files aresearched. If this search fails to load an application, all PBLsfrom the same directory as PBLName will be loaded.Automatically switches to the Browse page, indexing PBLdirectories, unless /INITPAGE is specified.

/EXPORTS:FolderName Loads the folder as an export container (acts the same as aA

PBL) if any *.SR* files are found.

/S Used with /PBL or /EXPORTS, searches subdirectoriesbeneath the one specified for matching files or folders.

Page 86: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 86 of 111

Initial Behaviour

/INITPAGE:page Used in conjunction with /CURRENT, /APP, /PBL orB

/PBLAPP. When the app specified in the command lineparameter is loaded, the application moves to the specifiedpage of the tab on the main window. Valid values are:

BrowseListsFindReportsTraceExportsProcessCompare

/DBG:filename Loads the DBG file specified in the filename parameter. TheB

Trace page is automatically selected. May be used with inconjunction with any other parameters that load an application,but if none is provided, the DBG file will be shown in thetreeview without source code shown in parallel.

/INDEX:expr[,expr2...] For the application specified by another parameter, all theobjects in all PBLs prefixed by one of the expr are indexed.

/PBINI:file1[,file2...] Loads applications from a PB.INI file other than the one foundin the same directory as the PowerBuilder executable.

Tool Windows Start

/LOADCLIPBOARD Loads a value from the clipboard on start up. The default actionC

is automatically initiated. Applicable when the initial windowis SQLFormatter, ScriptFormatter or Stringer.

/LOADFILE:FileName Loads the contents of the specified file on start up. The defaultC

action, if applicable, is automatically initiated. Applicablewhen the initial window is SQLFormatter, ScriptFormatter,Stringer, PSRViewer or RTFViewer.

/SAVECLIPBOARD Saves the result of the default action to the clipboard. ValidD

only with /LOADCLIPBOARD or /LOADFILE. Applicablewhen the initial window is SQLFormatter, ScriptFormatter orStringer.

/SAVEFILE:FileName Saves the result of the default action to the specified file. ValidD

only with /LOADCLIPBOARD or /LOADFILE. Applicablewhen the initial window is SQLFormatter, ScriptFormatter orStringer.

Page 87: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 87 of 111

/AUTOCLOSE If parameters /LOADCLIPBOARD or /LOADFILE and/SAVECLIPBOARD or /SAVEFILE are successful, PBLPeeper is automatically closed down. Applicable when theinitial window is SQLFormatter, ScriptFormatter or Stringer.

It should be noted that options with identical superscripts are mutually exclusive.

File or Directory ParameterIf only a file name is passed to PBL Peeper, the parameter will be mapped based on the fileextension as follows:

Extension Mapping

PBL /PBLAPP:%1

PBT /TARGET:%1

PBW /WORKSPACE:%1

SR* /EXPORTS:%1

TXT, RTF /WIN:RTFViewer /LOADFILE:%1

PSR /WIN:PSRViewer /LOADFILE:%1

SQL /WIN:SQLFormatter /LOADFILE:%1

If only a folder name is passed to PBL Peeper, the parameter will be mapped to /EXPORTS.

Page 88: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 88 of 111

(Type = “Function” AND Scripted_Ancestor = “Yes”) OR(Type = “Event” AND Extended = “Overridden” AND

( (Event_Type = “System” AND Owner_Has_Ancestor = “Yes”) OR(Event_Type = “Custom” AND Custom_Defn = “Ancestor”)

))

Applied PBL Peeper

How do I check for memory leaks?Using the Find Page, search for both Create and Destroy in the same pass. Ensure thatDestroys are executed for all Creates.

How do I migrate my application back from PowerBuilder 9 toPowerBuilder 8?

Create an empty directory. Load your application into PBL Peeper 9. Go to the ExportPage and the Mass Export subpage. Export the application to that empty directory. ExitPBL Peeper 9. Edit all exports to remove any PowerBuilder 9 specific code, such asHTMLDW specifications in DataWindows. Load any application in the PBLs Page ofPBL Peeper 8. Use a tool like PowerGen (http://www.ecrane.com) To Bootstrap Importthe exports into PBLs. (People back migrating to PowerBuilder 9 or later have the optionof using ORCAScript to bootstrap the PBLs. Library Painter becomes problematic whenloading cross-dependent or circularly dependent objects.) Go to PowerBuilder 8 and run afull regeneration of the new PBLs.

How do I check that all objects are built based on my class library?Load the application. Go to the Lists Page, the Objects subpage. Run the VIEW / SHOW

menu item and select Ancestor Information. Set the filter to Lower (Ancestor) = Lower(Type). The objects shown should only be the class library objects. Repeat the sameprocess on the Controls subpage, or produce the Inheritance report and include controls,reviewing the System Inherited Controls section at the end.

Overriding scripts that are inherited from your class library can defeat your ability toimplement universal logic in the ancestors. Scripts that override the ancestor withoutcalling the ancestor anywhere in its script should be reviewed as to why the override wasdone, and the framework should be evaluated to determine if the functionality beingavoided should be configurable from the descendant. To get a list of these scripts, go tothe SCRIPTS LIST subpage, and select SHOW... / EXTENDED. A filter that looks somethinglike this should give you a list of scripts that should be reviewed for internal calls to thesuper event/function:

Page 89: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 89 of 111

How do I ensure that GUI standards have been kept?To check simple attribute-based GUI standards (e.g. font face, font height, colour), go tothe appropriate subpage (Objects, Controls or DW Objects) on the Lists page. Run theVIEW / SHOW menu item and select Attributes, selecting the attribute(s) to check. Sort bythe attribute to review, and look for any items that do not meet the standard.

To check complex GUI standards (e.g. distance between controls), go to the appropriatesubpage (Objects or Controls) on the Lists page. Run the VIEW / SHOW menu item andselect Attributes, selecting the attribute(s) to check. Export the data and the syntax.Import the syntax to review the DataWindow’s table structure. Then build an externalDataWindow with identical table structure that includes additional groupings, computedcolumns, etc... that will be necessary to determine GUI standard compliance. Import thedata exported from PBL Peeper and review.

I want to browse an object, but I don’t know what PBL it’s in.Go to the Lists page, the Objects subpage. Use the EDIT / QUICKFIND function (with focusin the OBJECT column) or the EDIT / FIND function to locate the object in the list. Use theVIEW / BROWSER function to switch to that object on the BROWSE PAGE (this menu item isalso available on the toolbar, using the same icon as the BROWSE PAGE).

Or, go to the BROWSE PAGE and use the EDIT / QUICKFIND function (with focus on thetreeview). Use the UP function to move to the PBL, or check the microhelp to see thequalified object name, including PBL name.

I want to review all the DataWindow Clicked (or other) scripts.Go to the Lists page, the Scripts subpage (be prepared to wait as it indexes all objectscontaining scripts). Select the VIEW / SHOW menu item, and select Owner Type from thelist. Sort and filter as appropriate. To review within PBL Peeper, select from the listsuccessive scripts to review and select the VIEW / BROWSER menu item (or thecorresponding toolbar item). To review all the scripts at once, or to review outside ofPBL Peeper, select all the rows for the scripts to review, and select the FILE / PRINT menuitem, selecting Print selected scripts’ contents from the list. Select the OUTPUT TARGET asRICH TEXT WINDOW. This will produce a rich text window containing the scripts you wantto review. These can be searched online, or saved or printed for later review.

My PowerBuilder application GPFs.Run your application with PBDebug turned on (search your manuals for how this works).Be warned that your application will run quite slowly for this, and may produce a ratherlarge trace file. Load your application into PBL Peeper. Go to the Trace page and load thetrace file. Select the VIEW / LAST menu item (or toolbar icon). This will take you to the lastline your application executed before it GPF’d. Selecting VIEW / SHOW... / CURRENT CALL

STACK will give you the context from which the last function was called.

Page 90: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 90 of 111

How do I use PBL Peeper for producing reports on my system?The type of reports you want will determine how you use PBL Peeper for reporting. Inthe REPORTS PAGE, using the Application Print report is a good start. The resolve typewill significantly influence the type of information this conveys (see PREFERENCES).Those wanting to include the contents of objects in their documentation can use RichText Window as the OUTPUT TARGET. On the LISTS PAGE, several lists can be used asproduced immediately. The VIEW / SHOW menu item gives opportunity to add extrainformation to the lists, including any PowerBuilder attribute (e.g. X, Y, Width, Height)for objects, controls and DataWindow objects. If the format of the lists is unsuitable, oradditional groupings or calculated fields are desired, exporting the data and syntax can beexported for later customization. The REPORTS PAGE may also include reports suitable forsystem documentation.

Can I produce system metrics from PBL Peeper?On the LISTS PAGE, sums and counts are always included at the bottom of every list. TheVIEW / SHOW menu item also shows information useful in collecting statistics, such asscript line count or object line count. For ad-hoc reporting of metrics, these lists can befiltered to produce statistics (e.g. filter the OBJECTS list on TYPE to get a count ofwindows). For reproducible reports, export the syntax and data from a basic list (withoutusing the SHOW option to display additional information), and produce a report withappropriate groupings and computed fields with identical data structure to the listDataWindow. Import the exported data whenever metrics are required.

I want to move an object to another application, but I don’t know whatother objects it needs.

The LISTS PAGE, REFERENCES subpage provides this information. Select the object in theleft panel, with ANCESTORS, REFERENCES and CASCADING all checked. The resulting set ofobjects in the right pane, if copied over to the other application, will allow for a cleanregen without ancestor missing errors or reference missing errors.

I want to find how many times a function is being called during runtime fora certain task.

Produce a text debug trace of a sample application run using PowerBuilder’s PBDEBUGfunctionality. Start PBL Peeper with the application and load the trace file into the TRACE

PAGE. Use the VIEW / SHOW menu item and select Call stacks matching.... In the windowthat pops up, enter the name of the function and press FIND. The window that is producedwill show all instances in the trace file where that function was called, including the callstack that produced the call to that function.

Page 91: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 91 of 111

How do I see all the instance variables?Using the Find Page, search for “type variables” (the internal header for instancevariables in exports) in character-by-character mode, searching All portion types,outputting the entire script/portion. Similar methods can be used for shared variables andobject structures.

How do I launch PBL Peeper from the source PBLs in Windows Explorer(file associations)?

You can associate PBL Peeper with PBLs and assign actions to them that occur if youdouble click them or bring up their context menu. The following should get you started inthe right direction. It is based on what I did on a Win98SE system; see your OSdocumentation for details.

• In Windows Explorer, VIEW / FOLDER OPTIONS.... / FILE TYPES

• Assuming there’s no existing definition for PBL, press NEW TYPE

• Press CHANGE ICON... and select the icon you want to associate with PBLs(I browsed to the PowerBuilder executable and associated thePowerBuilder icon)

• Put PowerBuilder Library in DESCRIPTION OF TYPE

• Under actions, select NEW...• Put Open PBL’s App in ACTION; put "C:\Program

Files\Techno-kitten\PBL Peeper\pblpeeper.exe" /pblapp:%1 inAPPLICATION USED TO PERFORM ACTION (the path to the PBL Peeperexecutable is, of course, specific to your installation); press OK

• Optionally, repeat for Open PBL using the /pbl:%1 parameter• Optionally, repeat for Find in PBL’s App, using the /initpage:find

/pblapp:%1 parameters (this loads the app to the FIND page much morequickly)

• Optionally, select one for default using SET DEFAULT

• Similar steps can be done for PBT files and PBW files, with the /target and/workspace command line parameters.

• Assuming there’s no existing definition for DBG, press NEW TYPE

• Select appropriate descriptions and icons• Under actions, select NEW...• Put Open with current app in ACTION; put "C:\Program

Files\Techno-kitten\PBL Peeper\pblpeeper.exe" /current/initpage:trace /dbg:%1 in APPLICATION USED TO PERFORM ACTION (thepath to the PBL Peeper executable is, of course, specific to yourinstallation); press OK

• Optionally, set this action as the default

Page 92: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 92 of 111

Now, when you double click a PBL or DBG, or select the appropriate context menu, youwill automatically launch PBL Peeper. See COMMAND LINE PARAMETERS for details onhow these parameters work.

How do I search / review an object and its ancestors?To most exhaustively search an object and its ancestors, set resolve levels to the highestlevels: scripts and optionally DataWindow tables and controls. Go to either the BROWSE

page or the LISTS / OBJECTS page and print the object contents to a rich text window.When selecting print parameters, be sure to check: ATTRIBUTE ANCESTORS, SCRIPT

ANCESTORS, SCRIPT CONTENTS: ALL and both SHOW GHOSTS. The resultant rich textwindow can be used with its FIND functionality.

How do I selectively search and replace?This method is granular only to the object level. Go to the FIND page. Enter the searchparameters. Select DATAWINDOW OUTPUT. In the output, select the rows (Ctrl-Click andShift-Click) for the objects in which you want the target items replaced. Select EDIT /OBJECT FILTER / SET OBJECT FILTER FROM SELECTED. Go to the PROCESS page and yoursearch and replace will be restricted to the objects specified by the object filter you justcreated.

Can I use Script or SQL formatting from the PowerBuilder IDE?In the PowerBuilder IDE, custom icons can be added to the toolbar to call externalprograms. Set up a custom icon to format scripts, provide a command line similar to this:

"C:\Program Files\Techno-kitten\PBL Peeper\pblpeeper.exe" /win:scriptformatter/loadclipboard /saveclipboard /autoclose

Then, while developing, Select All and Copy from the script painter, press your customicon, and when PBL Peeper disappears, Paste. To create a toolbar icon for SQLformatting, use SQLFormatter as the window parameter.

How do I create a class hierarchy diagram in Visio?While PowerDesigner will reverse engineer your PBLs and create a class hierarchydiagram, you may need to do the same thing with Visio, depending on the available toolset. To accomplish this (details may vary between Visio versions):• Load the LISTS / OBJECTS page• Go to the menu and select VIEW / SHOW... / ANCESTOR INFORMATION

• For each object type of “userobject”, “window” and “menu” (and optionally forvarious types of user objects)• Select VIEW / FILTER and set the filter to type = the selected object type• Select FILE / SAVE AS... and save the list as Text with Headers

• Inconsistently, Visio requires a line in the text file defining the toplevel entity (the object type). To create this, copy one of the lines

Page 93: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 93 of 111

of text for an object and replace the object name and ancestor fieldswith something appropriate

• In Visio, select FILE / NEW / ORGANIZATION CHART / ORGANIZATION CHART

WIZARD

• Load the file• Set the NAME field to ObjectName• Set the REPORTS TO field to Ancestor• Optionally, add PBLName and Comments to the DISPLAYED

FIELDS

• Specify the option to take control over how much data is displayedon each page (I prefer putting everything on one Visio page, andtiling onto multiple sheets of paper at printing.)

How do I compare specific attributes between versions?

Sometimes a full comparison of applications versions produces too much data; sometimesyou need to compare specific sets of data. If you can view a set of attributes in a List, youcan compare them between versions. Loading each version in turn, load the data into aList, then FILE / SAVE AS / SQL to create SQL to load the data into a temporary table foreach version. (Depending on the DBMS you’re using, you may need to tweak the SQLthat creates the table.) Then you can compare attributes using standard SQL.

How do I search with boolean tests (e.g. “create datastore” AND (NOT“settransobject))?

This type of search can be done only on an object level (i.e. test for presence or absenceof string anywhere inside any single object) or on a script level (i.e. test for presence orabsence of string anywhere inside any single script). On the LISTS / OBJECTS page or theLISTS / SCRIPTS page, use the menu item VIEW / SHOW (or the corresponding toolbar item)and select FIND COUNT.... Enter the strings you want to search for, and start the findfunction by pressing OK. This will produce columns with a find count for each object orscript, one column for each search item. Select the menu item VIEW / FILTER, and create afilter expression based on the results of the find (e.g. “count_create_datastore > 0 ANDcount_settransobject = 0").

Page 94: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 94 of 111

Frequently Asked Questions

What does PBL Peeper cost?PBL Peeper is charityware. Download it and use it as you see fit. The version youdownload is not crippled or limited in any way. If you get to the end of a project, andPBL Peeper has helped you accomplish your goals, please make a charitable donation. Isuggest a donation to one of the following types of charity:• helps endangered or disadvantaged animals (e.g. World Wildlife Fund, Humane

Society, SPCA)• helps people in crisis (e.g. Red Cross disaster relief, Salvation Army, local food

banks)In terms of amount, I’d suggest a small percentage of a result of any PowerBuilderproject where PBL Peeper helped you be successful. For individuals, this would be basedon what you were paid over the course of the project. For project teams, this would bebased on a small proportion of the software budget.

Dropping me a note through the web site would be very encouraging.

My PBL Peeper is a beta version. Where can I find a gold version?There is no version of PBL Peeper that is not labeled beta. That label is there to remindusers that there are no guarantees when using PBL Peeper, and that functionality shouldbe considered unreliable. This is one of the side effects of the product being free. (Hint: IfI didn’t think that it worked under at least the circumstances that I’ve tested it in, Iwouldn’t release it or use it in my consulting practice.) Consider this the predecessor tothe Google model.

How can I make PBL Peeper run faster?Since PBL Peeper is reading through object exports, parsing them apart, and sometimeshaving to dig through ancestor chains, it can be slow. However, once an object isindexed, that index persists in memory. As a result, the more you use PBL Peeper in agiven session, the less it will have to index. Since these calculations are done once, you’rebetter off with a static copy of the application. If the application changes, you’re going tohave to select FILE / REFRESH APP (CTRL-SHIFT-R). You can look at the command lineparameters for options of loading applications and indexing them on application start.You can also look at options in the Preferences window. While the defaults representwhat I think is a balance between functionality and performance, I’ve tried to give controlto you in several areas. I’ll continue to add controllable preferences, so if you upgrade,check back in the Preferences window. One key place to look is the Resolve level. Whilea lower resolve level, or none, is a better performer, anything less than Orphans can causeconfusion. While other Resolve levels provide different insights into objects, Orphans isthe recommended level with respect to performance.

Page 95: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 95 of 111

Can I get the source code for PBL Peeper?In a word, no. There are several obstacles to releasing source code, including:• the source code is largely undocumented, and I’m far too lazy to get it done (it’s

amazing this is here!!)• customizations of PBL Peeper are where I hope to make some profit from the

construction of PBL Peeper. Anyone wanting a custom version should contact methrough my web site. Most popular customizations involve mass customautomated changes to existing applications.

Where do I check for the latest version or news on PBL Peeper?Sequel’s Sandbox is home for PBL Peeper. Sequel’s Sandbox can be found athttp://www.techno-kitten.com. You can also sign up for a mailing list using the Feedbackform on the site.

I’ve got a bug to report, comment etc.... Where can I send a note to Sequel?There is a feedback page on the PBL Peeper web site (see above for the URL). Becauseof the free and unsupported nature of PBL Peeper, I can’t guarantee responses.

Does PBL Peeper use metaclass functionality?Since PBL Peeper was built before PowerBuilder 6, it is not based on metaclassfunctionality. It instead relies on reading the export of an object, and splitting it up intoportions. Since metaclass functionality depends on being able to instantiate the classdefinition, and PBL Peeper users are not constrained to load all related PBLs in anapplication, metaclass definition loading has a legitimate opportunity to fail.

Why “PBL Peeper”?When trying to develop a cat-oriented name for the utility, my mind wandered to auniversal (at least North American wide) common culture for my generation: cartoons.And in that wandering, a line stuck in my mind: “I tawt I taw a peeping tom-cat!!” Andthat’s one of the primary things the utility does: peeps into PowerBuilder librarieswithout opening them. For lack of further genius, the name stuck.

What is that thing on the cat’s head?After Sequel began answer questions with Terry Voth in the Powersoft forums (originallyon the Microsoft Network, then back to Compuserve, and finally on the Internet), somemembers of TeamPowersoft (now TeamSybase) took it upon themselves to give her anhonourary induction into the Team (Sybase has yet to develop an official policy regardingfeline Team members). The symbol of the Team has always been the propeller beanie.The problem is, cat-sized propeller beanies are hard to come by. Team member JohnStrano and his wife Su constructed a propeller beanie substitute, reportedly pilfering partsfrom a teddy bear and a toy plane. The induction ceremony was held in a bar at thePowersoft User Conference in Orlando (1994). The ceremony was done in absentia, since

Page 96: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 96 of 111

Sequel doesn’t have her tattoos required to enter the United States (Terry, however,does).

Page 97: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 97 of 111

Known Issues

The following are the known issues as of the last documentation update (usually, the last majorversion). Please consult the ReadMe.txt for the latest details.

• PBL Peeper also won’t correctly export the binary portion associated COM controls.• The DW Columns list doesn’t deal with SQL UNIONs, and only examines the first

element of the UNION.• PowerBuilder on NT has a bug in the MultiLineEdit that trashes the tab indices. For now,

the workaround is to use the default tab stops of 8 characters.• Trace Page does not handle the binary, profiling type of trace files; only the PBDEBUG

style trace files.• Not every PBL Peeper functionality works well when the Orphans setting is None.

Testing on this setting is minimal, since it is significantly less useful in well designedsystems.

• Unbalanced quoted parentheses can cause problems in the parsing algorithms ofDataWindows.

• SQL parsing algorithms are as good as they are. They may choke on your SQL, and someinvalid SQL has caused it to crash or hang.

• I expect that code containing Unicode strings may cause problems, although I haven’t hadan opportunity to test this yet.

PowerBuilder Version Conflicts and ORCA

Because of ORCA issues causing conflicts between a PowerBuilder application and the installedIDE (ORCA isn't recommended by Sybase for use by PowerBuilder applications), ORCAfunctionality has been deprecated. Do not upgrade if you rely on this functionality.

Page 98: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 98 of 111

Tip of the Day List

The Tip of the Day displays on the splash screen when you start PBL Peeper. However, if it goesby too fast for you to read (you can control the minimum time it shows in the Preferenceswindow), you can come here to read it again.

• From the PBLs Page, select the set of PBLs you want to work against from the list ofavailable PBLs on the left. To select, use drag and drop, double click or press Enter. Youcan select individual PBLs, entire PBL sets from applications, directory subtrees or drives.

The selected PBLs will appear in the right listview.

• To change some of the behaviours of PBL Peeper, go to the Tools / Preferences menuitem. The most significant settings in this window relate to the Resolve settings. TheResolve level changes significantly both the performance of the tool and the ways inwhich it can be used.

• Resolve Level: None

Setting the Resolve Level to None will mean that the browser will only show portionsthat are contained in the export of the object being viewed. This may cause ambiguity, assometimes the context of a script (ie. the control which it relates to) has to be derivedfrom its ancestor.

• Resolve Level: Orphans

Setting the Resolve Level to Orphans will create “ghosts” of controls required to identifythe true context of a script. For example, a ghost of a command button may be generatedto clarify the context of a Clicked script.

• Resolve Level: Controls

Setting the Resolve Level to Controls will create “ghosts” for all controls inherited fromancestors that weren't modified in the current object and would otherwise be notrecognized as present. This Resolve Level requires that all ancestors be indexed.

• Resolve Level: Scripts

Setting the Resolve Level to Scripts will create “ghosts” for all controls and scriptsinherited from ancestors that weren't modified in the current object and would otherwisebe not recognized as present. This Resolve Level requires that all ancestors be indexed.

Page 99: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 99 of 111

• Resolve DataWindows: DW Tables

Turning this option on will create “ghosts” of the table definition for controls that have adefault DataWindow object defined, such as DataWindow controls, datastores, dropdown DataWindow columns and nested reports. This is helpful when developing ortroubleshooting on an object, to see what columns are available.

• Resolve DataWindows: DW Controls

Turning this option on will create “ghosts” of the user interface controls, grouped byband, for controls that have a default DataWindow object defined, such as DataWindowcontrols, datastores, drop down DataWindow columns and nested reports. This is helpfulvisualizing the real user interface.

• If scripts or portions don't look parsed properly (e.g. starts in the middle), odds are theobject has changed. Since PBL Peeper caches the object indexing, it is now grabbing thewrong substring. Select File / Refresh App from the menu.

• On the Browse Page, use the menu item View / Expand to expand the entire sub-treebeneath the currently selected item. This is particularly useful for DataWindows andobjects with embedded classes, like windows with tabs.

• On the Browse Page, use the menu item View / Collapse to close all expanded treeviewitems.

• Copy is available from more than just script / portion viewer panes and output richtextwindows. The Lists Pages all support copying. Treeviews and listviews will copy thecurrent item's label to the clipboard.

This can help while working in the development environment, copying scripts or objectnames into PowerBuilder

• Watch for the changing enabled status of menu items and toolbar buttons. These areenabled or disabled as focus moves from control to control, indicating which functionsare supported.

• To identify which line an application is GPFing on, run with PowerBuilder's PBDebugoption. In the PBDebug Trace Page, select the View / Last menu item to move to the lastline.

Page 100: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 100 of 111

• To build custom reports based on data collected in the Lists Pages, use the File / SaveSyntax menu item so that you can see the definition of the data set. Then use the File /Save As menu item to save the data (DBF recommended). In PowerBuilder, import thesaved syntax or build an external DataWindow based on the saved syntax's data set, andimport the data.

Using this approach, you can add headers, footers, dates and page numbers to anyDataWindow report.

• To customize any rich text report, simply use the File / Save As menu item to save thereport to a file. Then, load the RTF file into a word processor.

Using this approach, you can add headers, footers, dates and page numbers to any richtext report with most standard word processors.

• To customize any DataWindow report or list, simply do one of the following:

• Use File / Save As to save the DataWindow as a Powersoft Report (PSR). If youhave InfoMaker loaded on your system, double-clicking the PSR file in Explorershould launch InfoMaker load the PSR in preview mode. Go to design mode tomake any modifications such as headers, footers, page numbers, etc....

• Use File / Save Syntax and File / Save As to save the DataWindow's syntax anddata (preferable data format is DBF). In PowerBuilder, import the SRD file, openthe resultant DataWindow, customize in design mode and, in preview mode,import the data.

• Watch microhelp for hints on what the control with current focus is for.

• There is a small field on the microhelp line between the clock and the meter. Thisdisplays a number that indicates:

• line number in script / portion viewers

• row number in DataWindows

• page number in rich text output windows

• There is an icon on the toolbar which corresponds to the icon on the Browse tabpage.This will switch you back to the Browse Page from anywhere. On pages where a currentobject, portion, control or script can be identified, the browser will be switched to thatitem.

Page 101: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 101 of 111

• If you want to manipulate objects yourself, you can use the Mass Export subpage on theExports Page. After manipulating the resultant export files, the Mass Import subpage willproduce a new set of PBLs.

• On all grid style lists, the columns will automatically adjust their width so that data willnot be truncated, nor will they show extra space. Lists are ready to print without concernfor ambiguous, truncated data. This behaviour can be controlled on the Preferenceswindow, defining the type of autosizing algorithm to use, or turning off the servicecompletely.

• On all lists, counts are shown at the bottom. The main count counts the number of itemsin the list. The object count, on all Lists but the Object List, shows the number of distinctobjects represented in the list. The counts reflect the current state of the list, includingfilter.

• The Go To Line, available in script / portion viewers as well as in DataWindows, uses thesame shortcut as the PowerBuilder development environment: Ctrl-Shift-G.

• When defining a PBL set for PBL Peeper to work on, you can select any set of PBLs, notjust a set that defines a PowerBuilder application. However, not selecting a set of PBLsthat matches a single PowerBuilder application could result in problems with thefollowing:

• identifying the type of control

• identifying the ancestor

• resolving and ghosting controls (this may leave orphaned scripts, e.g. a clickedscript that in an ancestor belongs to a command button, but PBL Peeper has noway of identifying that)

• the Process page will be unavailable

• To speed finds, get only the output you need. In descending priority of performance:

• object name

• script name/entire script

• context lines = 0

• context lines > 0

Page 102: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 102 of 111

• To speed finds, get only the detail of match you need. Don't use case insensitive if youdon't have to. When using Match() expressions, context lines will slow down the processsignificantly.

• From the Lists / Objects page, use the View / Show menu item (or the plus window icon)to show:

Ancestor information: Shows additional columns of information about the objects thatcan only be derived by determining the ancestors

• From the Lists / Objects page, use the View / Show menu item (or the plus window icon)to show:

Duplicates only: Show objects with duplicate names

• From the Lists / Objects page, use the View / Show menu item (or the plus window icon)to show:

Autoinstantiate: Derives and displays whether custom class objects are autoinstantiate

• From the Lists / Objects page, use the View / Show menu item (or the plus window icon)to show:

Object Line Count: Counts the number of lines in the export of the object.

• From the Lists / Objects page, use the View / Show menu item (or the plus window icon)to show:

DataWindow Attributes: Shows the data source type and presentation type forDataWindows.

• From the Lists / Objects page, use the View / Show menu item (or the plus window icon)to show:

Attributes: Select any additional PB attributes to display (e.g. backcolor)

• From the Lists / Scripts page, use the View / Show menu item (or the plus window icon)to show:

Extended: Indicator whether, if the script has an ancestor, whether it is extended oroverridden

Page 103: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 103 of 111

• From the Lists / Scripts page, use the View / Show menu item (or the plus window icon)to show:

Line Count: The number of physical lines in the script

• From the Lists / Scripts page, use the View / Show menu item (or the plus window icon)to show:

Argument Count: The number of arguments in the function or event prototype

• From the Lists / Controls page, use the View / Show menu item (or the plus windowicon) to show:

Ancestor information: Shows additional columns of information about the controls thatcan only be derived by determing the ancestors

• From the Lists / Controls page, use the View / Show menu item (or the plus windowicon) to show:

Attributes: Select any additional PB attributes to display (e.g. fontfamily)

• From the Lists / DW Controls page, use the View / Show menu item (or the plus windowicon) to show:

Data set column name: The name of the data set's column that corresponds to columnobjects

• From the Lists / DW Controls page, use the View / Show menu item (or the plus windowicon) to show:

Column data type: The data type of the data set's column that corresponds to columnobjects

• From the Lists / DW Controls page, use the View / Show menu item (or the plus windowicon) to show:

SELECT column: The SQL expression associated with the data set's column thatcorresponds to column objects

• From the Lists / DW Controls page, use the View / Show menu item (or the plus windowicon) to show:

Attributes: Select any additional PB attributes to display (e.g. font.face)

Page 104: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 104 of 111

• From the Lists / DW Columns page, use the View / Show menu (or the plus windowicon) to show:

SELECT column: Shows the SQL expression associated with a column, as well as theowner, table and column associated if only one is used

• From the Lists / DW Columns page, use the View / Show menu (or the plus windowicon) to show:

Attributes: Select any additional PB attributes to display

• To search within a specific object, on the Browse page, right click on the object andselect Find / Find in this Object. You will be presented with a user interface to enter oneor more search terms. The output will follow the options set on the Find page.

• The Browse page lets you

• view the contents of objects

• view whether a script has an ancestor and whether it is extended or overridden

• jump back to ancestor scripts and return

• print object contents or subportions of objects

• All Lists subpages let you

• sort

• filter

• find

• jump to the Browse page to see the selected item's contents

Page 105: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 105 of 111

• The Objects List subpage shows all classes in your application. This is equivalent to whatyou'd see in a PBL in the Library Painter. Fields listed include:

• object name

• PBL

• object comments

• object size (source and binary)

• object source size (size of export)

• last compiled date

• The Scripts List subpage shows all events and functions. Fields listed include:

• script name

• owner (object or control which this script belongs to)

• object

• PBL

• definition or prototype (includes list of parameters and their types, and the returnvalue)

• size (bytes)

• type (event or function)

• scope (public, private or protected)

• ghost indicator (shows whether or not code is implemented for this script in thisobject, or if it is just being shown because of inheritance)

Page 106: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 106 of 111

• The Controls List subpage shows all subclasses in your application. This includes allcontrols on visual objects, and also all embedded non-visual objects in PB7 or greater.Fields listed include:

• control name

• containers (e.g. if a DataWindow is hosted inside a tab object and tabpage)

• object

• PBL

• immediate ancestor

• ghost indicator (shows whether or not attributes are declared for this control inthis object, or if it is just being shown because of inheritance)

• The DW Controls List subpage shows all the user interface objects declared on yourDataWindows, such as text, columns, bitmaps, etc.... Fields listed include:

• DataWindow control name

• object (the DataWindow)

• PBL

• object type (e.g. column, text, line...)

• style (e.g. dropdownlistbox, radiobutton...)

Page 107: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 107 of 111

• The DW Columns List subpage shows all the DataWindows' data set columns for allDataWindows. This can be used to compare data sets for functions that share data setsacross DataWindows, such as ShareData() and RowsCopy(). Fields listed include:

• column name

• object (DataWindow)

• PBL

• column number

• the “DB Name” assigned to the column by PB

• column's data type

• some of the DataWindow's Update properties, including

• updateable flag

• inclusion in WHERE clause flag

• key column flag

• The Find page searches your source code for you. It can:

• search for multiple strings in one pass of the code, merging the results into asingle output

• search for normal strings (character by character) or regular-type expressions (asdefined by PB's Match() function)

• choose to include or ignore matches found in comments or quotes

• include various levels of detail when a match is found, from just an object nameto an entire script to just the line of code where it was found

• Application Print Report:

Prints all the objects in the application, using the same routines as Browser's object print.Options are the same as the object print as well. If you run the output to a rich textwindow, it can be imported to a word processor later for addition of page numbers, screenprints, etc....

Page 108: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 108 of 111

• Comments Extract Report:

Extracts comments from all scripts. This can provide an overview of all scripts if they aredocumented inline.

• DataWindow SQL Report:

Lists SQL in all DataWindows. This will also show if they are procedures or externalDataWindows. The data set's data types are shown as well. A connection to the databaseis required for this report.

• Database Column Usage Report:

Identifies where database columns are used. Both DataWindow SQL and embedded SQLare evaluated. When found in DataWindow SQL, the dataobject is listed. When found inembedded SQL, the script is listed.

• DataWindow Object Usage Report:

Indicates where identifiable usages of DataWindow objects exist. Only dataobjectattributes for DataWindows and datastores, and explicit hard coded data objectassignments in scripts are included.

• Embedded SQL Extract Report:

Extracts all embedded SQL in scripts.

• Inheritance Report:

Inheritance report on objects. When generated at the object level, this produces the sameresult as PowerBuilder's Object Browser. When generated at the control level, it willadditionally show the inheritance of controls. This will give you a full picture of whereuser objects are used.

• MultiTable Registry Statements Report:

Generates of_Register () statements for the PFC Multi-Table update service. This simplycreates one statement for each table involved in the SQL statement, listing its columns.Key columns have to be added manually.

Page 109: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 109 of 111

• PBR Builder Plus Report:

Builds PBR contents and other components for building a single EXE. The PBR elements(for graphics, DataWindows) and script inserts (for windows, user objects) ensures thatall objects are included in the executable. This is the single EXE equivalent of markingall PBLs for PBD generation to make sure all objects are included in the distribution.

• Verify DW SQL Report:

Verifies DataWindow SQL against the database by executing a PREPARE statement withthe SQL. This will spot any DataWindow errors due to changes in the database. This willnot prompt for parameters, as other DataWindow SQL verifiers will. This report requiresa transaction object.

• The Trace page lets you view a PBDEBUG trace file in a treeview format, side by sidewith the related code. This lets you:

• find where an application is fatally ending

• view the call stack for any given point

• find where certain functions are called, including optionally viewing all calls andtheir call stacks in a single view

• Searching and replacing with the Universal option checked is highly dangerous,especially if you aren't familiar with the structure and contents of object exports.Accidentally replacing a keyword or attribute name will make the object unusable.

• Searching and replacing on DataWindow SQL means that the original text being used isthe SQL as you'd see it in the syntax preview in the DataWindow painter. You will not beoperating against the SQL the way it is stored in the DataWindow (e.g....table(customer)...). Any changed results are stored in syntax mode, not graphic mode.

• The Remove processor is ideal to get rid of debugging function calls before releasing toproduction.

• If Show Names Only is checked, Compare will only list the portion names that areidentified as different. If unchecked, FC (DOS File Compare) will be used to compare thetwo versions.

• Comparing objects takes a significant amount of time, especially if options to ignoreelements are checked. To avoid comparing objects that are likely the same, use theoptions Ignore Object when Modified Date/Times Match and Ignore Object When SizesMatch.

Page 110: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 110 of 111

• The Object Filter allows you to filter which objects are acted upon. The Object Filter isdefined by a filter expression that is evaluated against an internal object list. Filterscannot be given criteria below the object level (e.g. script = 'clicked' cannot be used).Changing the columns available in the Lists / Objects page with View / Show... doesn'timpact the columns available to the Object Filter.

• When the Object Filter is set, the menu item is checked and the toolbar item appearsdepressed. This gives you a visual indicator that a filter is set.

• When QuickFind starts searching, it will look for:

• an exact match for the entered string

• a match of the substring of the first characters of the string

• a match for any substring

• System Documentation:

The first stop for system documentation should be the Application Print on the Reportspage. It will print everything in the application. Suppressing details like contents ofscripts will make the volume more manageable. The options available in this report arethe same as with the Print from the Browse page.

• System Documentation:

One element of system documentation could be a print of the system tree from theBrowse page. Use View / Expand at the PBL level for each PBL. Then File / Print / PrintEntire Tree. The resolve level will significant change the nature of this report.

• System Documentation:

Lists in some form can be used in system documentation. If not used as is, the syntax anddata can be exported and used with a custom DataWindow.

• System Documentation:

Various reports on the Report page have differing value for system documentation. TheInheritance report is basic information that should be included in all documentation.Including controls in the inheritance structure is helpful by showing where user objectsare used (or not used).

• In most DataWindows or treeviews, you can use the View / Back and View / Forwardtoolbar buttons to move through the history of movements between rows/treeview items.

Page 111: Documentation Peeper

June 18, 2008 PBL Peeper Documentation Page 111 of 111

• If you see a 3D raised header on a display only grid DataWindow, odds are that it hasclick/sort capability.