jamesp0tter
Programmer
i've got unit1:
and in unit2 i have:
so, to call a function from unit2 in unit1 i have to F.Function, no problem there.
the main objective here is to have a unit full of functions, that i can call from other unit(s).
the thing is, unit2 will have a huge amout of functions, so i was wondering if there is any other way for this to work, without having to declare every function from unit2 in it's private section.
And, how do i refer to objects in unit1 from unit2's functions, if i can't declare unit1 in unit2's uses clause (causes error) ?
TIA !
jamesp0tter,
jamespotter@netcabo.pt
p.s.: sorry for my (sometimes) bad english![Stick out tongue :p :p](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Code:
uses Unit1;
type
TForm1 = class(TForm)
...
var
Form1: TForm1;
F: TF;
....
procedure bla bla;
begin
F.Function(1);
end;
and in unit2 i have:
Code:
type
TF = class
public
function 1;
function 2;
function 3;
function 4;
......
function 172;
end;
implementation
function 1;
begin
end;
.......
function 172;
begin
end;
so, to call a function from unit2 in unit1 i have to F.Function, no problem there.
the main objective here is to have a unit full of functions, that i can call from other unit(s).
the thing is, unit2 will have a huge amout of functions, so i was wondering if there is any other way for this to work, without having to declare every function from unit2 in it's private section.
And, how do i refer to objects in unit1 from unit2's functions, if i can't declare unit1 in unit2's uses clause (causes error) ?
TIA !
jamesp0tter,
jamespotter@netcabo.pt
p.s.: sorry for my (sometimes) bad english