"Implementation missing" error message

Right now I try to convert a larger toolset developed in Delphi to Oxygene.

Obviously there are many error messages - including a lot of those are messages like:

Error (E51) Implementation for method “function ReadValue(Def: TTSAString): Boolean” is missing …

which are displayed for almost all methods in some of the classes. Since the functions are defined, I am wondering what I have to do to get rid of this errors.

Regards,
Julian

Julian,

it’s hard to say without seeing concrete code. Most likely, there’s a mismatch between the implementation and the declaration, somehow.

I checked this already and it really affects most of the functions.

My findings so far: I got rid of message for the first classes in the unit by moving up the implementation to the beginning of the implementation.

So I assume there is something in the implementation section which stops the compiler recognizing the methods.

I already checks for global functions or variables or other types - but didn’t find any suspicious.

There is no “end.” since it actually can check the implemented functions and some of them are ok, others have still problems.

Ok, could be a bug. If you could send us the project, or the parts that reproduce the problem, (we’ll treat it confidential ofc), we can have a look.

Do you try CTRL+C to autocreate funcion body and see if theres some differnece between declaration and implementation?

Many thanks for the quick help.I compared the function body - that was not the problem.

But it seems so that I fixed it now:

I cut out the implementation of the largest class which was using all the other smaller classes and tried a compilation. I then pasted that at the end of the implementation section and compiled again. Most of those implementation missing messages were then gone.

I cannot send the code for a check since that is a really large unit.

I’m also porting a big Delphi Project to Elements.
I have seen the same problems.
For me i solved the most with the following steps:

Split all Units where more then 1 class is defined in different files
One file for a class. Set it in the same namespace.

I have now:
Namespace oldUnit;
and then Files as

  • oldUnit.Globals
  • oldUnit.Class1
  • oldUnit.Class2
  • etc…

These helps a lot

Thanks a lot, I will do that as well.

Note that this should only happen if some other errors in are in the way, and make the compiler not get to the proper implementations (eg something is very broken in the code fine, after your declaration but before the “missing” implementations.

Splitting into one file per class isa good way to find those, if you have a big mix, and is also good practice in general :wink:

I have some problems from time to time with class completion. I use RTL. Say I want a System.String as a parameter

method test(s: System.String);

class completion generates this:

method MyClass.test(s :String);

That last string is a RemObjects.Elements.RTL.String, so the implementation will be missing.

Regards

This is with Elements RTL in the uses clause, but you explicitly state System.String to override and Class Completion doesn’t honor it?

Thanks, logged as bugs://78661

Exactly.

1 Like

bugs://78661 got closed with status fixed.