Re: Confused about units
alanglloyd_at_aol.com
Date: 02/15/05
- Next message: Jud McCranie: "Re: Confused about units"
- Previous message: Matthew: "Re: Confused about units"
- In reply to: Maarten Wiltink: "Re: Confused about units"
- Next in thread: MikeB: "Re: Confused about units"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 15 Feb 2005 12:55:17 -0800
Maarten Wiltink wrote:
> "Matthew" <matthew@nospamhere.com> wrote in message
> news:api41192hd89tgiakl86kq09lj5e0rvcit@4ax.com...
>
<snip>
>
> Groetjes,
> Maarten Wiltink
I echo Maarten's approbation - good finding.
To clarify the relationship of "interface", "implementation" and
"uses".
The interface section contains items which any outside unit can see in
this unit (provided this unit is in the outside unit's uses clause).
Outside units however cannot see into the implementation section of
this unit.
The interface uses clause contains units in which any item in this unit
(both in the interface and implementation sections) can see the
interface section in an outside unit.
The implementation uses clause contains units in which the
implementation's items in this unit can see the outside unit's
interface clause.
If both interface uses clause contain the other's unit name then a
"circular reference error" ensues (as you found).
In general I put any of my other units that this unit's items has to
see, in the implementation uses clause, unless those items in this unit
are in the interface section of this unit. Then the other unit has to
go in the interface uses clause of this unit.
You may find this cannot work because items in both unit's interface
section have to see the other unit. Then those cross-referring items
will have to be moved to the same unit where they can see each other.
Note however that Delphi's units placed by Delphi in the interface uses
clause should not normally be moved to the implementation uses clause.
Alan Lloyd
alanglloyd@aol.com
- Next message: Jud McCranie: "Re: Confused about units"
- Previous message: Matthew: "Re: Confused about units"
- In reply to: Maarten Wiltink: "Re: Confused about units"
- Next in thread: MikeB: "Re: Confused about units"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|