When importing *. Sr * files in Pb, errors always occur. This error is always prompted. What should I do if this error is missing?

Source: Internet
Author: User

When importing *. Sr * files in Pb, errors always occur. This error is always prompted. What should I do if this error is missing?

PB-IDE is different from other ides, other ides such as C ++ are not compiled in real time, so the error line will be prompted until the point is compiled; Pb is different, once an error occurs, the data cannot be imported or saved to the database.

* You have noticed the debug icon of the IDE, which can immediately run the program. The principle is that there is a binary generated by timely compilation in the PBL, this is also the benefit of real-time compilation.

This problem is especially serious during SR import. How can we import data correctly?

Petabytes of data need to be tested in the following aspects: 1. Does the ancestor exist? 2. Does an external referenced object exist (including its ancestor, of course )? 3. Is the syntax correct?

* Why is there a problem? Because 1 is its own type, 2 is the type of the variable or control. In Oop, if there is no ancestor, then there is nothing at its own level; 3. It is easy to understand that real-time compilation stops you from allowing you to import files with errors. This problem also exists when importing from a lower version to a higher version, because the syntax is changed. Of course, a higher version can also be imported to a lower version, provided that the difference in its syntax is corrected.

The biggest problem encountered during decompilation import is: 1. you do not know the order of import. The above problems 1 and 2 are the primary issue to stop you. Of course, if there are syntax errors and all the ancestors exist, you will be prompted immediately, however, it fails. You must correct the syntax before importing the file again.

Of course, there are two solutions:

1. if you use Pb decompilation master Pb decompiler for import, it will output the list of global objects generated by inheritance and Reference Analysis (how can this tool schedule the order? In fact, during analysis, when a non-system-defined type other than [window, commandbutton], such as my_toolbar, is encountered, it will temporarily press itself into the stack and propose the object my_toolbar for analysis, this is also true for analysis of my_toolbar. If its ancestor is my_toolbar_ancestor, you must wait until the analysis of my_toolbar_ancestor is complete. The general meaning is that we must analyze the objects inherited from the internal base class of the system, analyze the subsequent objects until all objects are analyzed, and obtain the common interface [Properties
And functions] before you can begin to analyze the code and restore the code. It can be seen that the workload and complexity of The Decompilation tool are quite the same.) You can refer to it, but because there are too many objects, such as 15 PBD, or even 80 PBD, it is difficult for you to import a giant project from the SR method. Therefore, to restore the project, the first choice is to export the PBL + PBW + PBT method directly, then optmize, and then full-build method, which is the fastest and easiest way.

Of course, if you find that some objects have problems, or you have some SR, such as not lost or backed up, you can import it after 1, because other objects already exist, therefore, the system does not prompt missing ancestor.

2. without prompts such as the ancestor, this problem can not be solved simply by adjusting the import order, because of the complexity of Object Inheritance and reference, at that time, Sr was also used to import and export a small number of objects between different projects and files. It was not used to import and export all the projects as a whole, unless it disabled real-time compilation! Therefore, if there is an ancestor of the object to be imported or an external object to be referenced in the PBL, the import is very correct without any prompt. The procedure is as follows:

A. Add a PBW and PBT, for example, ABC. APL by default.

B. Then attach all the PBD of the original project, so that the project actually has the public interface of each object. Then, paste the decompiled APL source code to the source edit of the newly created ABC. APL file, save the file, and disable it if no error occurs.

C. Create an PBL instance with the same name as the original PBD, or use a different name, such as Inv. then Import Inv. in PBD, there should be no errors at this time. If there are errors, there may be some syntax errors. The Sr import method requires your Sr to be accurate, so you need to fix it outside the IDE. Of course, the method is not absent, that is, to create an object, paste, save, and report an error in source edit, and correct the position according to the prompt, because there is a compiler prompt when correcting in IDE, it is much easier to fix it than to use Notepad externally.

3. of course, the above 2 methods are also used for the gradual recovery of giant projects, because there are a lot of PBD, it is difficult to avoid the decompilation error, resulting in the crash of IDE loading. At this time, you can attach PBD to the project first, and then attach the PBL to compile the program one by one. Follow a curve. Or you only need to restore a few of the PBL files. The above 2 method is also used, because it is not necessary to compile all the PBL files, which increases the difficulty.

 

If any of the above operations is incorrect, please confirm.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.