Recent

Author Topic: [SOLVED] Circular unit reference  (Read 32872 times)

arwen

  • Full Member
  • ***
  • Posts: 104
    • http://www.flussiliberi.it/
[SOLVED] Circular unit reference
« on: July 09, 2007, 10:44:18 am »
Problem:
I have one Form1 with its Unit1 and one Form2 with its unit2.
For being able to modify, as an example, the caption of the Form2
from the Form1 I have included the unit2 in the section uses of the unit1.
But if at the same time I must be able to make the same thing from the
Form2 and I include the unit1 in the uses of the unit2 I receive this
message “Unit2.pas (9,17) Fatal: Circular unit reference between Unit2 and Unit1”

How to resolve?

Thanks to all

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: Circular unit reference
« Reply #1 on: July 09, 2007, 10:51:55 am »
Move one the use unitx to the implementation section.

arwen

  • Full Member
  • ***
  • Posts: 104
    • http://www.flussiliberi.it/
[SOLVED] Circular unit reference
« Reply #2 on: July 09, 2007, 11:05:08 am »
:D  Thanks Vincent  :D

I have modified the section implementation
of the unit2 as below and now work all :

Code: [Select]
implementation
uses unit1;

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
[SOLVED] Circular unit reference
« Reply #3 on: July 09, 2007, 11:10:43 am »
Indeed, that is the solution. :-)

 

TinyPortal © 2005-2018