Book a Demo

Author Topic: Delphi - Generated Code  (Read 4660 times)

greygor

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Delphi - Generated Code
« on: March 28, 2002, 04:38:04 am »
I think this will be the last request as it is now virtually working.  Just one little niggle.

Here is the source that was reverse engineered;

  TMammal = class(TObject, ICommunicate)
 private
   FEyeColour: TColor;
   FEyeColour2: TColor;
   procedure SetEyeColour(const Value: TColor);
   procedure SetEyeColour2(const Value: TColor);
 protected
   function Agree(Message: string): Boolean;
 published
   property EyeColour: TColor read FEyeColour write SetEyeColour;
   procedure Testing;
 public
   procedure Speak(Message: string);
   property EyeColour2: TColor read FEyeColour2 write SetEyeColour2;
 end;

Code Generated after import into EA

 TMammal = class (ICommunicate)

private
     FEyeColour: TColor;
     FEyeColour2: TColor;
     procedure   SetEyeColour(Value: TColor);
     procedure   SetEyeColour2(Value: TColor);

protected
     function    Agree(Message: string): Boolean;

public
     procedure   Speak(Message: string);

published
     procedure   Testing;
     property EyeColour:TColor read FEyeColour write SetEyeColour;

 end;

Two things;

1: A class Type is required so

  TMammal = class(TObject, ICoomunicate) should have been generated.

2: The public property EyeColour 2 was missed, but not the private field or procedure relating to it.


BTW, can I just congratulate you on the speed of response to these delphi issues, it is very much appreciated.

Mark Stansfield
Senior Developer/Trainer
www.runtimetechnology.co.uk

gsparks

  • EA User
  • **
  • Posts: 325
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: Delphi - Generated Code
« Reply #1 on: April 01, 2002, 04:08:03 pm »
Hi again,

I have checked these out and made the appropriate fixes.

Both public and published properties will now generate the first time, and if a class does not have an explicit parent, it is given the TObject ancestory, even when an Interface is implemented.

These will be in the next update - look for a build of 479 or higher. It should be available in the next day or so.

Thanks for the example and suggestions,

Geoff Sparks