Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Delphi Misc > way of passing ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 6044 of 6098
Post > Topic >>

way of passing class to another class

by g.morkvenas@[EMAIL PROTECTED] Apr 29, 2008 at 02:26 AM

Hello,

What is good way of passing class to another class? Who should create
and destroy class?



type TJob = class
        ID: integer;
        Name: string;
        StoredProcName: string;
        ThreadsAllowed: integer;
        OnStartup: boolean;
        OnClose: boolean;
        OnUserInteract: boolean;
        CCC_Interface_Apply:TCCC_Interface;
        constructor Create;
        destructor Destroy; override;
end;

type TAJob = class
Items: array of TJob;
        function Add(job:TJob): integer;
        constructor Create;
        destructor Destroy; override;
end;



function TAJob.Add(job: TJob): integer;
begin
setlength(Items,length(items)+1);
items[length(Items)-1]:= job;  // this is not look correct
end;
 




 3 Posts in Topic:
way of passing class to another class
g.morkvenas@[EMAIL PROTEC  2008-04-29 02:26:43 
Re: way of passing class to another class
"Maarten Wiltink&quo  2008-04-29 12:30:04 
Re: way of passing class to another class
"alanglloyd@[EMAIL P  2008-04-29 06:34:07 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 6:13:41 CDT 2008.