I have just upgraded to Rio 10.3.2 from 10.2.3. On opening my existing project into Rio, every form that contains a TEdit causes an Abstract Error when it is created. The problem only manifests itself when compiling to MacOS (just 32 bit currently). Even if I delete all other components and code from the form (so I can have a completely blank form), I still get the error. If I start a new project and place an TEdit on it, it seems to works fine. Has anyone experienced the same issue and does anyone have any suggestions as to what is causing this? Any help would be greatly appreciated.
Richard S4297 said:On opening my existing project into Rio
It is not a good idea to open existing projects from older IDEs in newer IDEs, the project migration RARELY works smoothly. You should always create a new project in the newer IDE, and then add your existing source files to it as needed.
Thanks for that Remy. I have never done it that way, but I'll look into it. I'm sure there is information out there as to how to achieve this quickly and efficiently.
Hi, can you check the list of uses of the working project and check if a unit is not missing in your upgraded project ?
Hi. I have ended up with the following:
System.SysUtils, System.Types, FMX.Forms, FMX.Controls, System.Classes, FMX.Types, FMX.Controls.Presentation, FMX.Edit;
This is what I did:
I started by taking one of the more simple forms in my project,
1) Deleted all TEdit controls... complied - success.
2) Re-instated a TEdit... compiled - failure.
3) Deleted all other visual controls... compiled - failure.
4) Deleted all remaining code... compiled - failure.
5) Edited uses down to the above... compiled - failure.
6) Removed the TEdit (only remaining component on the form)... compiled - success.
Hi Remy. Could you recommend an article that describes how to correctly port an existing project please? My application detects if it's own native projects come from a legacy release and upgrades the data etc. accordingly. I wonder why RAD Studio doesn't do that.
This is a difficult question for Remy. It does very much depend on how far back your old project goes.
I actually find that many simple projects (I work mostly in C++) do upward migrate without issues from versions from XE5 onwards.
If you are migrating from AnsiString projects (early C++ / Delphi) then you may have to work on changes to suit Unicode.
Projects saved with *.bpp *.bpg extensions tend to not migrate well. It's best to create a new project and then add the *.cpp files to the new project.
One tip: I have found it very useful at times to open each of the forms. Delete all the automatically generated # include <xxxx> header files and then save the form. The IDE then automatically regenerates the header files correctly for the new IDE.
Hello Roger. Thanks for the tip. I am migrating from 10.2.3 to 10.3.2, so virtually consecutive iterations of RAD studio . So I would have thought, like you, that it would have ported seamlessly. Sadly it would appear not.
This should also be fine. One option that might change is the actual compiler it uses. Sometime recently it's changed so that the default compiler is clang. If your old project used the "classic" compiler you may need to go to project | options and force the use of the classic compiler. Otherwise I am surprised and can't explain your issues. (which may not be helpful news!)
Well creating a new form with Rio and pasting my code into it, causes the same abstract error... so I'm not quite sure which way to turn now. Having spent over £1000 on the RAD studio upgrade to get a few bug fixes, I am finding it all very frustrating!
Okay at last I found it! A rogue copy of FMX.Platform.Mac.pas on my library path. Thanks for the help.