Code reusability is the basic element for creating a maintenance software system. effecect can help you extract reusable classes from applications. The outermost layer of each pivotinspector instance represents a class of consumer ect that allows you to develop from top to bottom or from bottom to top. If you start from a single view container, you will constantly change the class configuration.
Code reusability is the basic element for creating a maintenance software system. effecect can help you extract reusable classes from applications. The outermost layer instance of each effecect inspector represents a class of effecect that allows you to develop from top to bottom or from bottom to top. If you start from a single view container, you will constantly change the class configuration
Code reusability is the basic element for creating a maintenance software system. effecect can help you extract reusable classes from applications.
The outermost instance of each effecect inspector represents a class.
Terraect allows you to develop from top to bottom or from bottom to top. If you start from a single view container, you will constantly change the class configuration to enhance it. If you focus on building a single specific presentation form from the very beginning to design your application and then assemble it, you can use Linked Instances to implement it.
The purpose of using Linked Instances is to reuse it. You have created a common component or xtype and then created a Linked Instances so that it can be reused whenever you need it.
When you change the initial component, the Linked Instances of all components will change. Each Linked Instances inherits all the changes. You can also edit Linked Instances separately. Modifying properties overwrites the original component. When you use another effecect feature to enhance the class (right-click a component in inspector), this becomes very useful.
Example
Add a Form Panel as the top-level component, and add a FieldSet and two Text Fields to it. Set form's userClassName-> SpecialForm, userAlias-> specialform. View
Add a Window as the second top-level component in inspector and drag SpecialForm to the window. A pop-up box will pop up asking you whether to copy move or link, and select link. In this way, terraect creates a Linked Instances name of SpecialForm in MyWindow, and creates a new xtype named specialform that can be reused in the project, for example:
Let's reuse this specialform in a viewport and add a Viewport top-level component. In inspector, drag the top-level component SpecialForm to the viewport. In the pop-up box, select link, terraect creates the Linked Instances of the second SpecialForm, for example:
If the initial component changes, the other two will also change. You can also click a change. Please try it yourself
Write more Linked Instances with Overwriting
Sometimes the visual view may not be able to complete some operations by dragging. For example, you cannot add a ComboBox to the viewport instance form.
To do this, create an overwrite containing a combobox. Select viewport and click "Code". Then, click "Create Override. Use the editor to create and overwrite the initComponent. But note that this is not displayed in the interface, because the impact ect does not understand the overwriting code, you can see it at runtime.
Now let's talk about the instance link.