1. Brian Barton
  2. PowerBuilder
  3. Wednesday, 20 March 2019 08:57 AM UTC

I'm running the latest version of PowerBuilder 2017 R3 Build 1880 Cloud Edition.

I'm running into an issue where you remove a function call dependency that another object relied on.  So of course, doing an incremental build reveals this problem.  Can't open it directly in visual mode, not a problem, I'm used to editing the source.  Op, wait, the object is not checked out.  I go to check out object... PowerBuilder bombs EVERY TIME.  I try to check out object directly on back end of source control, I edit the source, and at one point, after I reload PowerBuilder, it shows the object as checked out.  I try to regenerate... bomb.  I come back in, and the object has now disappeared from my list.  After checking in and out, and trying to import the object into my library, I can no longer see the object, and the import process doesn't do anything at all.  No notices about what happened to the object, whether it was imported or anything.  At least older versions of PowerBuilder still allowed you to check the object out, even if it wouldn't compile, and simply let you know that.  Now, you can't even do that, it blows the object away out of your object list, so where is it, and how do I get it back?  Importing the object doesn't work period.  Also, why isn't the check out feature working, and importing the object from source control like it should, without having to worry about whether it compiles or not.  Shouldn't matter, I've done this a billion times in past versions without a problem.  Why now?  Help!  Thank you in advance!!!!  If I can't check out objects that don't compile without PowerBuilder blowing up all the time, not sure how this is supposed to work?!  Is this problem duplicatable?  Thank you!!!!

--Brian

 

Accepted Answer
Brian Barton Accepted Answer Pending Moderation
  1. Thursday, 21 March 2019 04:29 AM UTC
  2. PowerBuilder
  3. # Permalink

Ok, interesting turn of events, long story short, problem is solved. 

More in depth, after working on this for quite a bit, I figured it couldn't be as simple as an issue with PowerBuilder's import.  After attempting constant reimports, even into new libraries, there were issues.  I created a new object similar to the old one, just fine.  When imported the old object, object disappeared, and the problem all over again.

So I started looking at the object closer.  I was too reliant on the idea that my object hadn't changed. So I started looking more closely through the object code, and noticed one section that ended with an event declaration, but didn't have a start one.

Got checking source control history, had one revision besides the initial checked in version, and noticed the sure enough, somehow the new checked in version, the initial event declaration was missing.  ( event ue_init;call super::ue_init; )  You know the usual reaction of shock and disbelief of how the erroneous version got into source control.  Not sure how, I'm very anal when it comes to source control.  Once I added that back in, object showing up, working like a champ.  So note to self, if there is an object that I'm trying to import, and it disappears, it's probably because it doesn't compile because there is some object code that's actually missing.

I want to thank everyone who looked at this.  I'm hoping that this is a learned mistake that others can learn from, especially when it comes to objects disappearing from your library after an attempted import.  Now to find the rock under which to hide my embarrassment.  Thanks Chris and gang!

--Brian

P.S. Still frustrated how that missing event header made it into my source control.  :-\

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 20 March 2019 13:37 PM UTC
  2. PowerBuilder
  3. # 1

I haven't tried that scenario in 2017 but it is supposed to give a messagebox asking if you want to keep the bad code.

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 20 March 2019 14:09 PM UTC
  2. PowerBuilder
  3. # 2

Hi Brian;

  What I do in this case is to restore (undo checkout) of the object that contains the deleted method and then perform a full build to make sure all is well again.

  The next thing I do is to checkout all the objects that use / reference that "potentially" deleted method. Then perform the method removal within all objects.

  An alternative method I use if the method code removal is quite elaborate, is to check out all the related objects and then copy the entire application to a new work folder. Then open the copied App in the PB IDE with NO active SCM. Then refactor all the objects / methods as required. Once its all working OK, copy the refactored objects back into the main App folder replacing the "checked out" versions. Retest the App and is all is OK. Commit the Checkout(s).

HTH

Regards ... Chris

 

 

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Wednesday, 20 March 2019 17:07 PM UTC
  2. PowerBuilder
  3. # 3

Yeah.

If I understand this post correctly, the developers ABSOLUTELY should be able to check out objects that do not compile.

If that's not possible in R3, an enhancement request needs to be submitted to allow that to happen.

The nonsense described above to get around this simple issue is, quite frankly, Ministry Of Funny Walks level silly.

 

Later -

Olan

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 20 March 2019 17:31 PM UTC
  2. PowerBuilder
  3. # 4

You can checkout objects that will not compile. When you do a Check-Out, the latest version is retrieved from source control and it is imported into the library. If the import fails, it displays a messagebox. The messagebox gives you a choice, keep the imported version or revert to the prior version. You can choose to keep the imported version and fix the problems in Edit Source mode.

 

The problem he is having is that the IDE is aborting.

 

I would Optimize the library. Then turn off source control temporarily and manually import the object from the .sr* file.

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.