2 Runtime Packages: how can I use a unit from each other? (Delphi)
Posted
by Christian Almeida
on Stack Overflow
See other posts from Stack Overflow
or by Christian Almeida
Published on 2010-06-07T22:07:04Z
Indexed on
2010/06/07
22:12 UTC
Read the original article
Hit count: 332
Hi,
Lets assume we have 2 runtime packages, with 1 form in each one;
Pkg1 -> Unit1 (frm1)
Pkg2 -> Unit2 (frm2)
Now I want that they "know" each other. When pkg1 needs to know Unit2, we have to "require" Pkg2 in Pkg1. So now I can do a "uses" Unit2 and then do frm2.Show in Unit1 code.
But when I do the same thing in Pkg2 (set to require Pkg1), it does not compile, informing that Pgk2 already have a unit name Unit2 (I think is because Pkg1 is requiring Pkg2).
So, how to: in Unit1 do a "uses Unit2" and in Unit2 do a "uses Unit1"?
Thanks in advance.
© Stack Overflow or respective owner