I'm considering creating a non-visual object that contains a "is running as solution" function and a wrapper for the LibraryDirectory function.
The IsRunningAsSolution" function will perform these steps:
- Check the handle of the Application object and return False if it is non-zero. This means the app is NOT running from the IDE, so the LibraryDirectory method will work since the PB objects are packaged into PBD's or DLL's.
- Issue GetLibraryList() to obtain the list of pbl's (for a workspace) or folders (for a solution).
- See if the first (possibly, the only?) "library" file exists. A solution will list the directories as full paths created when the workspace migration to a solution was performed or a new solution is created. These folder names all end with ".pbl". A FileExists call will return True only if the .pbl file exists and False if only the solution folder exists.
Preliminary testing indicates this may be a viable approach.
The LibraryDirectory "wrapper" function will first use the IsRunningAsSolution function. If the PBL's (or deployed .pbd's or .dll's) are available, the PowerScript function is called and the results passed back to the caller. If the PBL's are not available, a search of the files within the "library" directory will be performed against the object type argument as if the PowerScript function was used.
We have prepared an offline installation version for you PB2025 build 3484.
We adapted some Library functions. In addition, the function IsRunningAsSolution is provided to determine whether PB IDE is running under solution.
Please download and install it to verify the issue you reported and let us know if any problems.
PowerBuilder Download Link:
https://file.appeon.com/download/APB/2025/R1/OneOff/build_3484.00/OneOff-PB2025R1-3484.zip
SHA256 Hash of OneOff-PB2025R1-3484.zip:
https://file.appeon.com/download/APB/2025/R1/OneOff/build_3484.00/SHA256/OneOff-PB2025R1-3484.txt
Regards,
Peter