|
Business Graphic Objects
Now that your BGO has been created,
you can use it in a panel to animate it. You will link it to a slider
prototype, so that when you move the slider, it updates the SuperGauge
prototype.
Return to PrStudio and select
the
File - New - Prototype Instances (2D) command. It will open a new window in the workspace. Now
drag and drop your new prototype from the palette window into this window.
The SuperGauge will appear and behave as a single object. You will now
use a slider prototype to provide data to the gauge. In the palette window,
go to the "output" prototype category, and drag and drop the slider
into the panel window.
Now you can connect these two objects.
Click on the "Group Connection" button of the PrStudio vertical toolbar
This command lets you to connect
two prototypes by drawing a link between them. Create a link from the slider
to the SuperGauge. This operation pops up the connection window:
This window shows the
connectable values in two columns. The slider has only 1 output value,
and your SuperGauge has only 1 value (an input value).
Select both values and click "OK".
You should now see a green arrow showing the connection like this:
That's it. Let's test this panel
by pressing the "Test" button of PrStudio
or the "Active" button of the vertical toolbar
Play with the slider, moving it
left or right, and you will see the gauge immediately updated accordingly.
Conclusion
You have seen here how easy it is to
build a panel using prototypes connected together. This is very useful
for testing the prototype behaviors within the editor. But when you build
real applications, the prototypes are supposed to be fed by external data
coming from the application. For example, in a supervision application,
a data-acquisition system will provide data to the application, and this
data will update the prototypes for graphical display. You will see how
to do this in the next step.
|