Joined: 02 Dec 2003
|Posted: Wed Jul 28, 2004 7:18 pm Post subject: New Usage of Service Call Component in Synopsis 1.1
|A fundamental difference in usage between Synopsis 1.0 and Synopsis 1.1 has to do with the Service Call component.
Recall from the Help modules for Synopsis 1.0 that the Service Call component is used to access the services of an object component. An object component can offer services like a normal Synopsis component but also can maintain its own data throughout the duration of a program session. In Synopsis 1.0, we need to use a Service Call component to access an object component.
As an example, let's look at how the Service Call component accesses a Windows Form component in Synopsis 1.0:
To connect the Service Call component to the Windows Form component we click on one component's green object port and then click again on the other component's green object port. The Component Service Browser dialog then appears and we can select the service that we want the Service Call component to access. In the above example, we selected the "Show form" service, which causes the Windows Form to appear on the screen.
In Synopsis 1.1, object components still exist but the way in which we use them has changed. Let's look at a similar example but this time in Synopsis 1.1:
First, we see that the appearance of the icons in Synopsis 1.1 is different from Synopsis 1.0 - the component icons have changed for better visual effect. Second, note that in Synopsis 1.1 the Windows Form object component and the Service Call components no longer have green object ports. The Windows Form component has a green background to indicate that it is an object component. Also, the Windows Form component now has red process ports, meaning that the component can be called and used as other Synopsis process components. We can see that the Windows Form component has the "Show form" service selected. We can double click on the Windows Form component to see and select the service that we want to use.
The Service Call component can connect to any object component in your Synopsis program. This is done by double clicking on the Service Call component and then selecting the required object component name in the "Object component" property of the "Component Properties" dialog that appears. Once you connect a Service Call component to an object component, the list of services offered by the object component appears in the "Active service" property. In our example above, we selected the "Set border" service.
The change in Synopsis 1.1 for Service Call components allows for the visual simplification of the program, as green object ports and green connections lines are no longer needed.
In addition, Service Call components can connect to Nesting Components. This effectively allows you to reuse portions of your program, akin to having subroutines or functions. The selection of a Nesting Component is the same as for an object component. Simply double click on a Service Call component and select the desired Nesting component from the "Object component" property list.