Consultor Eletrônico



Kbase P24635: Why are the absolute path names of the smart objects that I drop on a smart window at design time ha
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/12/2004
Status: Unverified

FACT(s) (Environment):

Windows
Progress 9.x

SYMPTOM(s):

Why is the absolute path of the Smart Objects hard coded in the Smart Window?

CAUSE:

The directory where these smart objects were located at design time was not in the Working Directory

FIX:

During UIB design using SmartObjects, if you click on a SMO in the Palette, you will see the Choose Object Dialog Box which lists masters for that SMO type. For example, you would see a list of masters for SmartViewers if you click on the SmartViewer object in the Palette.
This list is built from .w's in your current working directory. If you choose one of these .w's, the resulting RUN statement will reference the file without a path specification (i.e., RUN v-slsrep.w).
If you click on the Browse button, you will be able to access .w's other directories as well as the working directory (using GET-FILE I system dialog). If you choose a file this way, the resulting RUN statement may include the entire path specification for the file (i.e., RUN c:\class\labs\v-slsrep.w), even if the file is in your current working directory. This depends on the PROPATH definition at the time. If a portion of the file specification is included in your PROPATH, that portion will be stripped from the path for the file name. If you rely on the '.' in your PROPATH to pick up the current directory, a complete path will be generated for the file.
In order to maintain portability, all masters might be maintained in a single working directory which is used as the working directory during UIB design by all developers. Then the unqualified file name will be resolved using the PROPATH setting at runtime.
Alternatively, the file structure used during design would have to match the deployment structure to a certain level so that the so that the full or relative pathname for the file can be resolved correctly.
Example:
Start with the following browse : /work/browse/b-cust.w.
Your PROPATH UIB Code Contains
. /work/browse/b-cust.w
., /work /browse/b-cust.w
., /work/browse b-cust.w