RAD Studio
ContentsIndex
PreviousUpNext
Using the Object Repository
Name 
Description 
You can add your own projects, forms, frames, and data modules to those already available in the Object Repository. 
Choose Copy to make an exact copy of the selected item and add the copy to your project. Future changes made to the item in the Object Repository will not be reflected in your copy, and alterations made to your copy will not affect the original Object Repository item.
Copy is the only option available for project templates. 
Choose Inherit to derive a new class from the selected item and add the new class to your project. When you recompile your project, any changes that have been made to the item Will be reflected in your derived class, in addition to changes you make to the item in your project. Changes made to your derived class do not affect the shared item in the Object Repository.
Inherit is available for forms, dialog boxes, and data modules, but not for project templates. It is the only option available for reusing items within the same project. 
If you modify an item in the Object Repository, your changes will affect all future projects that use the item as well as existing projects that have added the item with the Use or Inherit option. To avoid propagating changes to other projects, you have several alternatives:
  • Copy the item and modify it in your current project only.
  • Copy the item to the current project, modify it, then add it to the Repository under a different name.
  • Create a component, DLL, component template, or frame from the item. If you create a component or DLL, you can share it with... more 
You can share items within a project without adding them to the Object Repository. When you open the New Items dialog box ( FileNewOther ), you"ll see a page tab with the name of the current project. This page lists all the forms, dialog boxes, and data modules in the project. You can derive a new item from an existing item and customize it as needed. 
You can share objects with your workgroup or development team by making a repository available over a network. 
Choose Use when you want the selected item itself to become part of your project. Changes made to the item in your project will appear in all other projects that have added the item with the Inherit or Use option. Select this option with caution.
The Use option is available for forms, dialog boxes, and data modules. 
To access items in the Object Repository, choose FileNewOther. The New Items dialog appears, showing all the items available. Depending on the type of item you want to use, you have up to three options for adding the item to your project:  
Templates are predesigned projects that you can use as starting points for your own work. 
The Object Repository ( ToolsOptionsRepository (under Translation Tools Options) ) makes it easy share forms, dialog boxes, frames, and data modules. It also provides templates for new projects and wizards that guide the user through the creation of forms and projects. The Object Repository is maintained in DELPHI32.DRO (by default in the BIN directory), a text file that contains references to the items that appear in the Repository and New Items dialogs. 
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!