Board index » delphi » Finding redundant components
Ed
Delphi Developer |
Ed
Delphi Developer |
Finding redundant components2003-08-24 02:07:14 PM delphi116 Using Delphi 6, is there a way to search a .pas file for components that have been dropped on a form but are no longer used ? I'm mainly thinking of TQuery and TTable components. After several years of maintenance we have quite a few that are still declared but no longer used and I don't fancy searching each individually. Regards Ed |
Joanna Carter
Delphi Developer |
2003-08-24 03:53:05 PM
Re:Finding redundant components
Ed writes:
| Using Delphi 6, is there a way to search a .pas file for components that | have been dropped on a form but are no longer used ? | | I am mainly thinking of TQuery and TTable components. After several years | of maintenance we have quite a few that are still declared but no longer | used and I don't fancy searching each individually. If you use an Object Persistence Framework then you would rarely use more than one dataset and that would be created in code. Most of the SQL is generated automatically by the framework and the framework can also handle cusom SQL statements that return/store objects or lists of objects. Put your Business Rules in your objects and remove data-aware controls from your forms or use an object dataset to populate your edits. Either way, you will save a fortune in debugging and maintenance costs Of course, if you still want to keep looking for redundant components, then please feel free to ignore this message. ;-) Joanna |