1. Benjamin Gaesslein
  2. PowerBuilder
  3. Tuesday, 30 March 2021 09:33 AM UTC

Hi guys,

is there any way to make SharedObjectRegister work with an object contained in a PBL that was dynamically added to the library list via SetLibraryList? We use PBUnit to externally run testcases. The compiled PBUnit application basically loads a target file and adds the contained PBLs to its own library list. It works well in general but SharedObjectRegister always returns SharedObjectCreatePBSessionError! when I try it with objects that were not present in the original list. A regular create on these objects works fine.

Regards,

Benjamin

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 30 March 2021 14:39 PM UTC
  2. PowerBuilder
  3. # 1

Hi  Benjamin;

   Have you tried using the "AddToLibraryList" command instead?

Regards ... Chris

Comment
  1. Benjamin Gaesslein
  2. Tuesday, 30 March 2021 15:06 PM UTC
I tried it now, it does not seem to make a difference.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 30 March 2021 19:07 PM UTC




Hi Benjamin;

I was not sure but just thought that it "might" work (hoping that). I think that we would need a PBVM enhancement in this area in order for either of these to work with a Shared Object.

Thought: What about the following alternative (aka the Quarter back sneek approach) ...

1) Create one or more Dummy and "empty PBL's (ie: Dynamic001.pbl, Dynamic002.pbl, etc (as required)

2) Add the Dummy PBL's to your App's Library list in the associated Target of the IDE

3) Create the new dynamic PBL one-the fly as required.

4) Rename, and do a Copy/Replace of the new PBL over top of the DynamicNnn.pbl.

That way, the PBL dynamics is available but the library list is static. Thus satisfying the SharedObject library list restriction but adds the dynamics as required.

Food for thought (never tried this myself BTW).

Regards ... Chris
  1. Helpful
  1. Benjamin Gaesslein
  2. Tuesday, 30 March 2021 19:32 PM UTC
Interesting idea, I might try it. But I don't think it's feasible, the app is meant to be included in a build pipeline to unit test several PB apps before deployment.



Not a big deal, really, I have boolean flags for all multithreading components to make them work single-threaded, I will just do that for unit testing. Would've been cool if it worked with shared objects, though. It was worth a try.



I appreciate your input, Chris.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.