Solved

Using a Object Property of an Object in a DLL

Posted on 2007-03-19
3
154 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

752 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