When creating the executable file, PowerBuilder can identify the associations you made in the painter, because those references are saved with the object's definition in the library, and direct references in scripts, because the compiler saves this information.
However, it cannot identify objects that are referenced dynamically through string variables. To do so, it would have to read through all the scripts and process all assignment statements to uncover all the referenced objects. The following examples show objects that are not copied to the executable file:
If the DataWindow object d_emp is associated with a DataWindow control dynamically using the following statement, d_emp is not copied:
dw_info.DataObject = "d_emp"
The bitmap files assigned dynamically in the following script are not copied:
IF Balance < 0 THEN p_logo.PictureName = "frown.bmp" ELSE p_logo.PictureName = "smile.bmp" END IF
The reference to window w_go in a string variable in the following window script is not found by PowerBuilder when building the executable file, so w_go is not copied to the executable file:
window mywin string winname = "w_go" Open(mywin,winname)