Working with View Wrapper parts
You have defined four separate visual parts that will be used to construct the Investment application. We've used one of the visual parts, the SecurityFormView, as a reusable part within the BuySecurityView and SellSecurityView parts. Now we need to link our windows together. Before linking them together, we'll need to add the BuySecurityView and SellSecurityView windows to the free-form surface of the MainWindowView visual part. This will be done using the VA Smalltalk View Wrapper part. A view wrapper provides a simple iconic view of a part that can be added to the free-form surface and easily connected to from other parts.
For more information on the View Wrapper part, refer to the Visual Programming User Guide.
Adding windows as View wrappers
1. Open a Composition Editor on the MainWindowView visual part from the Organizer.
2. Once the Composition Editor opens, add the BuySecurityView as a View Wrapper by doing the following:
a. Select add part
Add part icon
from the tool bar.
b. In the Class Name field, type BuySecurityView.
c. In the Part Type field, select View Wrapper.
d. Select OK.
The mouse pointer is now loaded with a View Wrapper part representing the BuySecurityView visual part you created earlier.
3. Click with mouse button one over an open area of the free-form surface to add the View wrapper part.
You can now work with the attributes, events, and actions of this part within your MainWindowView visual part just as you can any other part.
4. Repeat steps 2 - 4 to add the SellSecurityView visual part as a View Wrapper part to the MainWindowView visual part.
 
For Windows:
If the Composition Editor is open on the MainWindowView part you can open the Composition Editor on the BuySecurityView by selecting the Edit Part choice from the BuySecurityView view wrapper pop-up menu.
Last modified date: 07/23/2020