1. Jason Lipman
  2. PowerBuilder
  3. Tuesday, 12 April 2022 20:57 PM UTC

Hello Everyone.

Powerbuilder 2019 R2 Build 2353

I opened a second, unused, Application object sitting in one of the PBLs in my Target to take a look inside. It has been there for years before I came onboard. While the other objects in that PBL with the 2nd Target are used, that unused Application object is not.

Now the Target has associated itself with that unused Application object! I cannot open the real Application object and I see no way to get it back!! 

What is going on!? Any idea how to re-associate the Target with it's true Application object?

Jason

Accepted Answer
Jason Lipman Accepted Answer Pending Moderation
  1. Wednesday, 13 April 2022 14:00 PM UTC
  2. PowerBuilder
  3. # Permalink

Well, I really do NOT know what I did to fix this, but I can get in now.

I actually changed the target to reflect the incorrect, opened/closed the app, then put it back to correct. Not sure if this did anything at all!

Then I noticed no window would open in the entire app, so I tried to do a full Rebuild and the app closed on me.

Then going back in, I was able to complete the full rebuild, and THEN I could run my app!

Jason

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 12 April 2022 21:23 PM UTC
  2. PowerBuilder
  3. # 1

Hi Jason;

   Close your IDE & then just edit the Target object (file) with Notepad & change the source to point back to the correct App Object. Then restart the IDE & return back to your App Workspace & Target.

   Once your back on the correct App Object, please delete the extraneous one.

Regards ... Chris

Comment
There are no comments made yet.
Jason Lipman Accepted Answer Pending Moderation
  1. Wednesday, 13 April 2022 13:36 PM UTC
  2. PowerBuilder
  3. # 2

Chris,

Thanks for the guidance. Which element in the target are you referring to when you say 'source'. See example below.

Save Format v3.0(19990112)
@begin Projects
0 "1&p_power_exe&powerapp.pbl";
@end;
appname "powerapp";
applib "powerapp.pbl";
LibList "powerapp.pbl;5500.pbl;ach.pbl;
type "pb";

Everything above is correct. The incorrect PBL that holds the incorrect app object is not noted above.

Jason

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 13 April 2022 14:29 PM UTC
Hi Jason;

If the App Name & Library is correct in the PBT file's source - then that is what the IDE will look for at Workspace open time. However, in the Workspace source file, it also points to the *default* Target to use at open time. So the other possibility is that the WS source file is trying to open the wrong target as the default. That is easy to fix as well by just editing the WS file via Notepad.

HTH

Regards ... Chris
  1. Helpful
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Wednesday, 13 April 2022 13:48 PM UTC
  2. PowerBuilder
  3. # 3

appname "powerapp"; is what may need to be changed.

Comment
  1. Jason Lipman
  2. Wednesday, 13 April 2022 14:05 PM UTC
Thanks for the thought, Andreas. powerapp is the correct name, but in any event, I got it to work. :)
  1. Helpful
  1. Andreas Mykonios
  2. Wednesday, 13 April 2022 14:09 PM UTC
From your other answer I guess a) your second application object was in a different library than powerapp, b) the issue was related by making another target current.

Andreas.
  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.