Solved

Using a Object Property of an Object in a DLL

Posted on 2007-03-19
3
153 Views
Last Modified: 2010-04-05
I have an Object in a DLL that contains other Objects.  These are all created by me.  

i.e.

  Type
     TMyObj = class (TObject)
       private
          FData: Integer;
       public
          construstor create;
          destructor destory;
          property MyInt read FData write FData;
 end;

   type
      TMyOtherObj = class(TObject);
         private
            FObj: TObj;
         public
            constructor create;
            destrustor destory;
             property MyData read FObj write FObj;
       end;

constructor TObj.create
begin
   inherited create;
end;

destructor TObj.destoryl
  inherited destroy;
end;

constructor TMyOtherObj.create
begin
   inherited create;
   FData.Create;
end;

destructor TMyOtherObj.destory;
begin
  FData.free
  inherited destroyl
end;

    When I try to add data to the FData var it does not work.

   What did I do wrong?
0
Comment
Question by:ranunez
  • 3
3 Comments
 
LVL 21

Accepted Solution

by:
ziolko earned 500 total points
ID: 18748878
constructor TMyOtherObj.create
begin
   inherited create;
   FData := TObj.Create;
end;


ziolko.
0
 
LVL 21

Expert Comment

by:ziolko
ID: 18798621
any luck?
ziolko.
0
 
LVL 21

Assisted Solution

by:ziolko
ziolko earned 500 total points
ID: 18798624
of course should be:
constructor TMyOtherObj.create
begin
   inherited create;
   FObj := TObj.Create;
end;

ziolko.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question