2 Runtime Packages: how can I use a unit from each other? (Delphi)
- by Christian Almeida
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.