Strange code generation for interfaces in Delphi

Hello,

I’ve created simple classes: one interface, and one implementing class. I generated delphi code for them. The code looks like this:

Unit mySDK;
	Interface
		Type
#1			IsdkEventHandler = Class;
#2			ISDKpoint = Class;
#3			CsdkEventHandler = Class;
#4			IsdkEventHandler = Interface(IInterface)
#5				Procedure handleAgentStatusEvent(var aSender:KlasySDK.ISDKpoint; var aEvent:AgentStatusEvent); 
			End;

The point is that this code won’t compile (at least in D2009). First error is:
“Identifier redeclared” at line #4

How can I get code in following style?

type
IsdkEventHandler = interface
   Procedure handleAgentStatusEvent(var aSender:KlasySDK.ISDKpoint; var aEvent:AgentStatusEvent); 
end;

best regards
Piotr Rezmer

Hi Prezmer,

Thanks for your post. Would you mind to send me your project file for investigation? Thanks in advance!

Best regards,
Lilian Wong

No problem,
I’ve attached simple example.
Generated code looks like this:

Unit example;
	Interface
		Type
			IExample = Class; <--- should be "interface" or omitted

			IExample = Interface(IInterface) <-- should be "Interface" only, without brackets and IInterface

				Public Procedure myMethod(); 
			End;

	Implementation

End.

best regards
Piotr Rezmer
example.vpp

Hi Prezmer,

Thanks for replying with the sample project. I’ve forwarded the issue to our engineers to investigate, and I’ll come back to you once there is any feedback.

Best regards,
Lilian Wong

Hi Prezmer,

Sorry for my late response. We fixed this Delphi code generation problem, please run “VP Suite Update” in VPSuite/bin folder for getting latest patch (20091013f or later) for this bug fix. More details about update to latest patch from:

Please let me know if there is anything we can help again.

Best regards,
Lilian Wong