Ver Mensaje Individual
  #2  
Antiguo 09-12-2005
Avatar de dec
dec dec is offline
Moderador
 
Registrado: dic 2004
Ubicación: Alcobendas, Madrid, España
Posts: 13.107
Reputación: 34
dec Tiene un aura espectaculardec Tiene un aura espectacular
Hola,

Si estás referenciando a una unidad en la cláusula "uses" de la interfaz de otra, aquélla no podrá referenciar a esta en su cláusula "uses" de la interfaz. La solución está en mover a la cláusula "uses" de la implementación una de las dos referencias. Lo siguiente está extraído del apartado "Circular unit references" y es un extracto (casi completo):


Cita:
Empezado por Ayuda de Delphi
In the simplest case of two mutually dependent units, this means that the units cannot list each other in their interface uses clauses. So the following example leads to a compilation error:

Código Delphi [-]
unit Unit1;
interface
uses Unit2;
Código Delphi [-]
unit Unit2;
interface
uses Unit1;
However, the two units can legally reference each other if one of the references is moved to the implementation section:

Código Delphi [-]
unit Unit1;
interface
uses Unit2;
Código Delphi [-]
unit Unit2;
interface
{...}
implementation
uses Unit1;
{...}
To reduce the chance of circular references, it's a good idea to list units in the implementation uses clause whenever possible. Only when identifiers from another unit are used in the interface section is it necessary to list that unit in the interface uses clause.
__________________
David Esperalta
www.decsoftutils.com
Responder Con Cita