Offices in Auckland, Napier, Wellington & Christchurch
"The information contained in this document is confidential to the addressee(s) and may be legally privileged. Any view or opinions expressed are those of the author and may not be those of Catalyst Risk Management. No guarantee or representation is made that this communication is free of errors, viruses or interference. If you have received this e-mail message in error please delete it and notify me. Thank you."
> -----Original Message-----
> From: delphi-bounces@ns3.... [mailto:delphi-
> bounces@ns3....] On Behalf Of John Bird
> Sent: Tuesday, 3 April 2007 3:52 p.m.
> To: 'NZ Borland Developers Group - Delphi List'
> Subject: [DUG] Uses
> I have a standard component thingy from which I want to be able to call
> routines that are specific to one project.
> My aim is to centralise some complex functions like data editing or
> as much as possible in one powerful unit, but still have the shared
> able to call functionality specific to this project.
> I presume the best way to do this is to vary the uses clause for the
> project, using the same function names that exist in different units.
> However the standard component thingy has to have a fixed unit name in
> "uses" clause.
> Say the component thingy is called StandardEdit, and calls some
> GeneralLoadData and GeneralSaveData
> The StandardEdit unit would have
> "Uses GeneralFunctions" in its uses clause.
> I could have several units called GeneralFunctions (in various folders)
> functions called
> GeneralLoadData and GeneralSaveData in each of them,
> One could be in a folder called DummyGeneral, and each function just
> nothing. This would be used in cases where the StandardEdit is being
> (but no special functionality is needed in these functions) just to
> the linker.
> And others specific to the project could be in the project folder for a
> specific program, with code in each function specific to that project -
> for project Fred1
> "Uses GeneralFunctions in "\src\Fred1\GeneralFunctions.pas"
> Which one gets linked in to a particular program depends on the DPR
> defines which SharedFunctions unit is actually included in this
> Question - is this the best way to call specific tailored routines from
> standard shared unit, or is there another better way I have missed?
> Delphi mailing list
> Delphi@ns3.... > http://ns3.123.co.nz/mailman/listinfo/delphi