1. Olan Knight
  2. PowerBuilder
  3. Tuesday, 10 September 2019 14:17 PM UTC

PB v12.1, build 7055
Window 7, 64 bit platform
PNB Classic application

I have a tabpage.
It was working great. I exported it to SAVE the work.
I did an EDIT SOURCE on the tabpg. DId not loke the result. Exited.
When I attempt to import the SRU that I exported earlier, I get the following error:

icabs_cfg.pbl(u_cfg_tabpg_tier_levels).35: Error       C0176: Badly ordered TYPE and VARIABLE declarations. Is this modified exported source?

Say WHAT?

What does "Badly ordered TYPE and VARIABLE declarations" mean?
Anyone know how to track this error down?


Thanks,

Olan

John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 10 September 2019 18:15 PM UTC
  2. PowerBuilder
  3. # 1

Hi, Olan -

If you inspect the beginning portion of source code from several windows or user objects via Edit Source, you might notice the pattern whereby object type declarations always precede declarations of variables/objects. This makes sense, as the compiler needs to identify an object's type before it can work with a variable/object of that type.

I think in your case the compiler found one or more VARIABLE declarations prior to seeing the TYPE declarations, resulting in the "What do you expect me to do with this mess you are importing?" message you received during the attempted object import.

Stupid compiler! It should just KNOW what is meant!!! wink

I'm glad you were able to eventually restore your object.

John

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Tuesday, 10 September 2019 16:37 PM UTC
  2. PowerBuilder
  3. # 2

Since I had the original EXPORT file, I was able to recreate the object by starting over.

First, I saved the original export file into a different file, then I opened that new file in Notepad++.

Next, I would add an object, save and regenerate, open in EditSource mode, and replace the object definition with the definition from the saved export file in Notepad++. Save the object, regenerate, and export it to save my work.

I repeated step 2 until all objects were created, then restored all the functions, then all of the events.
Save. Regenerate. Export.


Yeah, it was kind of ugly, but it worked and I now have my object that took a week to create back in working order.


Thanks,

Olan

Comment
There are no comments made yet.
Bernhard Stoeter Accepted Answer Pending Moderation
  1. Tuesday, 10 September 2019 14:51 PM UTC
  2. PowerBuilder
  3. # 3

Very old bug in all(?) PowerBuilder versions including PB 2019.

Try to import the exported source into another pbl and move it to it's original place.

Bernhard

Comment
  1. Olan Knight
  2. Tuesday, 10 September 2019 16:36 PM UTC
Thanks, Bernhard. I had never seen this before.



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