Looking at an application’s structure
If you are working with an application that references one
or more objects in an application-level script, you can look at
the application’s structure in the Browser.
To display the application’s structure:
- Click the Browser button on the PowerBar.
-
In the Browser, select the Uses tab page and select
Expand All from the Application object’s popup menu.PowerBuilder expands the display to show all the global objects
that are referenced in a script for the Application object. You
can expand the display more as needed.
Which objects aredisplayed
The Browser’s Uses tab page shows global objects
that are referenced in your application. It shows the same types
of objects that you can see in the Library painter. It does not
show entities that are defined within other objects, such as controls
and object-level functions.
Which references are displayed
The Browser displays the following types of references when
the Application object is expanded.
Objects that are referenced in painters For example:
- If a menu is associated
with a window in the Window painter, the menu displays when the
window is expanded. - If a DataWindow object is associated with a DataWindow
control in the Window painter, the DataWindow object displays when
the window is expanded. - If a window contains a custom user object that includes
another user object, the custom user object displays when the window
is expanded, and the other user object displays when the custom
user object is expanded.
Objects that are directly referenced in scripts For example:
- If a window script
contains the following statement:1Open(w_continue)
Then w_continue displays when the window is expanded.
Which referenced windows display in the Browser Windows are only considered referenced when they are opened
from within a script. A use of another window’s property
or instance variable will not cause the Browser to display the other
window as a reference of the window containing the script.
- If a menu item script refers to the global function
f_calc:1f_calc(EnteredValue)
Then f_calc displays when the menu is expanded. - If a window uses a popup menu through the following
statements:1m_new mymenu1mymenu = create m_new1mymenu.m_file.PopMenu(PointerX(), PointerY())
Then m_new displays when the window is expanded.
Which references are not displayed
The Browser does not display the following types of references.
Objects that are referenced only through instance
variables or properties For example:
- If w_go has
this statement (and no other statement referencing w_emp):1w_emp.Title = "Managers"
Then w_emp does not display as a reference for w_go.
Objects that are referenced dynamically through
string variables For example:
- If a window script
has the following statements:1window mywin
1string winname = "w_go"
1Open(mywin,winname)
Then the window w_go does not display when the window
is expanded. The window w_go is named only in a string. - If the DataWindow object d_emp is associated
with a DataWindow control dynamically through the following statement:1dw_info.DataObject = "d_emp"
Then d_emp does not display when the window containing
the DataWindow control is expanded.