Solved

Using a Object Property of an Object in a DLL

Posted on 2007-03-19
3
152 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to debug For loops? 3 56
Wincontrol not (correctly) drawn 15 40
How to make Sign in, using Clientdataset? 1 28
shape, triangle, dbctrlgrid 3 17
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 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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

856 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