Copy, Inherit, Use
Go Up to New Items
For specific Object Repository items, the following three options are available:
- Copy the item
- Inherit from the item
- Use the item directly
When you use an item from the Object Repository (specifically, the Inheritable Items group in New Items) in a project, you have these three options on how to include the item. Keep in mind that items in the Object Repository are to be shared, and so you should use them in ways that help the reuse, rather than hinder reuse, of the object.
Contents
Copying items from the Object Repository
Select Copy to copy the selected item and add it to your project. Future changes made to the item in the Object Repository are not reflected in your copy, and alterations made to your copy do not affect the original Object Repository item.
Inheriting from Object Repository items
Select Inherit to derive a new class from the selected item in the Object Repository and add the new class to your project. The Inherit option creates a link to the ancestor item in the repository. When you recompile your project, any changes that have been made to the item in the Object Repository are reflected in your derived class. These changes apply in addition to any changes or additions you make to the item in your project. Changes made to your derived class do not affect the shared item in the Object Repository.
Using Object Repository items directly
Select Use when you want the selected item itself to become part of your project. In this case, you are not making a copy of the item; you are using the item itself "live." Using the item adds the item itself to your project, just as if you had created it as part of that project. Design-time changes made to the item, therefore, appear in all projects that directly use the item, as well as affecting any projects that inherit from the item. Changes to the item appear in all projects that have added the item with either the Inherit or Use options selected.