Questions tagged [uses-clause]

10 questions
14
votes
7 answers

How can I identify and get rid of unused units in the "uses clause" in Delphi 7?

This should reduce the executable size quite a bit in some of my very large projects. I am sure there would be other benefits too. EDIT: Is there perhaps a utility that will scan the project and remove redundant ones automatically? I do have 100s of…
Johan Bresler
  • 6,450
  • 11
  • 56
  • 77
10
votes
3 answers

Delphi: Which are the downsides of having unused units listed in the uses clause?

I use cnPack Uses cleaner, but in general which are the downsides of having useless units? I know some of them: 1) of course if the unit is never used across the full project there will be useless resource consuption 2) the code insight will give…
UnDiUdin
  • 14,924
  • 39
  • 151
  • 249
10
votes
1 answer

Differences in uses clause

What is the difference between a declared unit in the interface block and a declared unit in the implementation block?
TheWesDias
  • 293
  • 2
  • 8
6
votes
1 answer

Adding a unit to the uses clauses of all units in a project?

I am finding that certain kinds of code cleanups and refactorings are made VERY difficult by the difficulty of adding a unit to the uses-clauses of a large project. I want to add a unit to the interface-uses-clause of all delphi .pas units in a…
Warren P
  • 65,725
  • 40
  • 181
  • 316
3
votes
4 answers

How do I view the hierarchy of which Unit USES another? (Delphi)

There is a large project, and I need to see the hierarchy of Units which each file references in it's USES clause. ex. Project Source (program.dpk) HelperUnit Forms …
Daisetsu
  • 4,846
  • 11
  • 50
  • 70
2
votes
1 answer

Stop Delphi automatically adding units incorrectly

I am updating our projects from XE7 to XE8. For the time being they will still need to work with XE7, so a few conditionals are required. For example, ImageList has changed units, so Vcl.ImgList is Syste.ImageList in XE8. To make it work on both…
norgepaul
  • 6,013
  • 4
  • 43
  • 76
2
votes
1 answer

IPPeerCommon and IPPeerClient

I'm going over the cloud samples CloudExplorer and CloudUpload provided by Embarcadero, and IPPeerClient and IPPeerClient are units listed under the uses clause. I'm trying to figure out what these units do for/with the cloud, but can't seem to find…
Kendra Lynne
  • 397
  • 3
  • 11
1
vote
4 answers

Uses with unit file path in unit file

I have problem. I ll try to explain it. I have a unit which has a class and may will have new functions. D3BF4E849ACC45249B990F802EFB1F15\UnitFile1.pas 8DC8977E7A7B469AACFE3CC77CA7075E\UnitFile1.pas Both of them have same class: IClass_1 = class Im…
tcak
  • 2,142
  • 1
  • 16
  • 23
0
votes
1 answer

What does Delphi take as Circular Reference?

So, people. I have a aparently simple question. Does Delphi consider the next example as a Circular reference? I'm reaching Out of Memory Error with a similar set of code. unit CodeA; interface uses CodeB; implementation end. - unit…
Guill
  • 350
  • 5
  • 17
0
votes
3 answers

How do include something if no defines are found

I use the following code in my settings classes to determine what to use. But now I have run in to the problem that I had forgotten to copy the correct .INC file to my project folder and that give me an AV since none of the defines are found. How do…
OZ8HP
  • 1,443
  • 4
  • 31
  • 61