[DUG] Component names

Stacey Verner stacey at cjntech.co.nz
Thu Aug 25 14:33:11 NZST 2005


Not too sure what you are asking but I will give it a go anyway.

if (MyTable.Name = MyDataset.Name) and (not MyTable.Active) then begin
	MyTable.Open;
end; 

Note: It is standard to prefix parameters with "P" (stands for
parameter) or "A" (stands for argument) so you should have PMyTable or
PTable.
Similarly Local variables are usually prefixed with "L". In the end it
makes it easy for figure out whene a variable comes from. "P" is a
parameter. "L" is a local variable and anything else is a property of
your class.

Stacey

> -----Original Message-----
> From: delphi-bounces at ns3.123.co.nz 
> [mailto:delphi-bounces at ns3.123.co.nz] On Behalf Of Mark Howard
> Sent: Thursday, 25 August 2005 14:09
> To: delphi at ns3.123.co.nz
> Subject: [DUG] Component names
> 
> Hi
> 
> Newbie (still!) question
> 
> I have a procedure that is passed a parameter MyDataset : TDataset
> 
> Within the procedure I want to do
> 
> if not MyTable.Active then
> 	MyTable.Open;
> 
> where MyTable.Name = MyDataset.Name
> 
> Can someone please help me with the syntax, which eludes me?
> 
> Thanks
> 
> Mark
> 
> 
> --
> Forest Production Systems Ltd
> Creators of PSLog - A harvesting information system www.pslog.co.nz
> Skype: markhoward
> 
> 
> -- 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.10.15/80 - Release 
> Date: 23/08/2005
> 
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
> 



More information about the Delphi mailing list