Forum Discussion
It seems that circural unit references are allowed in Delphi Script.
So I this solved my problem this time, but not actually very nice solution.
That's precisely what you need to do. The "general" unit needs a uses statement to indicate to include methods from the "actualtest" unit. Otherwise, it doesn't know what "actualtest" is. Standard Delphi development, not just script code. You'd run into the same problem in the Delphi IDE.
- mikakoistinen6 years agoContributor
actually, in Delphi i could write an anonymous method .. but this is enough for me .
- tristaanogre6 years agoEsteemed Contributor
Yeah, but this is scripting... DelphiScript is not full delphi so there are some limitations... I, personally, don't like circular referencing (makes for spaghetti code) so what I would potentially do is pull the common function that both units call out into it's own unit and have general and actualtest "use" that unit.
Alternatively, if normalizedata is a common enough function that doesn't have application specific code in it, you could pull that out totally into a Script Extension which would then be present as an object available to all units of code without needing to use a "uses" statement.
Related Content
- 7 years agojohnybasha786
- 2 years agohinabatooq
- 11 years agovmu
- 8 months agosinis
Recent Discussions
- 19 hours agodhundley