1. Ashutosh Varshney
  2. PowerBuilder
  3. Monday, 19 November 2018 21:11 PM UTC

Hi,

A very strange thing happened today. I was working on a window using the source editor. I tried to save my changes but it would not save - no errors or anything. I closed out of the source editor without saving. Now my window is missing. I have no idea what happened. I did a full build and of course I got multiple errors saying the window is missing. Anyone else experience something like this? Is there a way to get it back?

I have PB2017 R2 1769.

Thanks.

Ashutosh

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 21 November 2018 14:36 PM UTC
  2. PowerBuilder
  3. # 1

Okay so now I see what's wrong when you first said:

Optimizing "used to work to recover deleted objects". It does not work anymore. I don't know which version it stopped but it's been this way for quite some time. Thanks for your help

Sorry, but your totally wrong there. It has NEVER served to recover "deleted objects". It only has two functions:

1) It has always served to compresses your pbl by recovering the "SPACE of" deleted objects.

2) Sometimes, when you have been editing source code directly or have imported certain incorrect exported code, then it might show you the messagebox of "having found code without a valid object" when you do an optimize of the pbl.

(Just try what I described before with importing the w_main.srw and you'll see what I mean)

I neither said that you "always" can recover an object when you have optimized.... What I was trying to explain is that:

  • If you did optimize somewhere in the past, when the object was still okay and visibly present in the pbl, then the BAK file might still contain a version of that (old) object.

smile I don't think you optimize ever, so that remote change of getting (even if it's an old version of the object) is minimal.

 

Once again: if you have a PBD file, you might give a try to the decompiler of which a gave you a link.

If that link doesn't work google on "shudepb decompiler" and you should find it.

 

Sorry mate can't do anything else, good luck !

regards

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 21 November 2018 03:38 AM UTC
  2. PowerBuilder
  3. # 2

Dear Ashutosh,

 

You say "Optimizing used to work to recover deleted objects. It does not work anymore. I don't know which version it stopped but it's been this way for quite some time. ".

You are very wrong here, I don't know who told you this.

 

First of all:

I have deleted all objects from a pbl which was 171 kb, except for the application object. After that, it was 95 kb. After optimizing it, it was 14 kb. 

So the optimize does recover the space of deleted objects.

Second:

When for example you import an exported file which has determined errors. You will get an error, and you won't see the object in you library. I you then optimize, lot's of time there's erroneous pieces of code in the pbl.

To prove this, try to import my attached w_main.srw into some library. See the attachments to prove my case. Before trying to import, the file w_main.zip has to be renamed to w_main.srw first. (It's not a zip, but Appeon doesn't allow an srw file to be uploaded here).

Third:

So are you saying that you never optimize your libraries? I think you really should do that now and then, especially before releasing a product to a client.

 

Sorry I cannot help you any other way though.

regards.

Attachments (6)
Comment
  1. Ashutosh Varshney
  2. Wednesday, 21 November 2018 14:03 PM UTC
Thanks Miguel. I am not saying optimize does not work at all - what I am saying is that optimize does not work to recover deleted objects. For ex. I deleted an object in my library and then optimized it. Then I renamed the bak file to .pbl - still the deleted object is not there. Am I missing something? In all these years I have worked with PB I have never seen the missing code message.

  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 20 November 2018 20:33 PM UTC
  2. PowerBuilder
  3. # 3

If you recently have optimized the library, you might have a BAK file. Just rename it to PBL (if you have it of course).

If you have a recent PBD file where your pbl's are, maybe you can still recover something: download Shudepb a powerbuilder decompiler tool. The demo version won't recover everything (I seem to remember only the first 25 or 50 lines of code of every event / function), but it might help in recovering what you've lost: http://www.download25.com/install/shudepb.html

 

Comment
  1. Ashutosh Varshney
  2. Tuesday, 20 November 2018 21:38 PM UTC
Optimizing used to work to recover deleted objects. It does not work anymore. I don't know which version it stopped but it's been this way for quite some time. Thanks for your help.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 20 November 2018 07:56 AM UTC
  2. PowerBuilder
  3. # 4

try to optimize the pbl. It might tell you it found some code and ask you if you want to export it.

At least you will get some code back.

regards

Comment
  1. Ashutosh Varshney
  2. Tuesday, 20 November 2018 17:07 PM UTC
Thanks Miguel. But that did not help.
  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Tuesday, 20 November 2018 02:18 AM UTC
  2. PowerBuilder
  3. # 5

Do you have multiple targets in your workspace?
If so, you were most likely creating your object in a PBL that was not part of the current target.

Olan

Comment
  1. Ashutosh Varshney
  2. Tuesday, 20 November 2018 02:31 AM UTC
That's what I had thought initially - maybe I moved it accidentally to some other library or target. But that is not the case. The window is no where to be found.
  1. Helpful
There are no comments made yet.
Ashutosh Varshney Accepted Answer Pending Moderation
  1. Monday, 19 November 2018 22:10 PM UTC
  2. PowerBuilder
  3. # 6

Thanks Chris.
I was working locally and unfortunately, my backup is a few days old. I guess I have to redo from that point.

Comment
There are no comments made yet.
Ashutosh Varshney Accepted Answer Pending Moderation
  1. Monday, 19 November 2018 22:00 PM UTC
  2. PowerBuilder
  3. # 7

.

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 19 November 2018 21:30 PM UTC
  2. PowerBuilder
  3. # 8

Hi Ashutosh ;

    I have only heard of this happening when the PBL libraries were residing on a File Server vs locally. The problem occurred when a network I/O request fails. This was the case too in order PB versions.

    Hopefully, you have a back-up of that object class so that you can restore it.

Regards ... Chris

Comment
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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.