[prev] [up] [next]

Component Plugin Scheme

Contents

Introduction

Some standard mechanism has been defined and added to ST/X, which allows for arbitrary widgets (view instances) and subApplications (applicationModel instances) to be handled by the GUIPainter and plugged into another application.
This allows for components to define which attributes and aspects are to be considered as "pluggable" and those can be changed/connected to values or other components in the GUI Painter tool.

Although this was possible in earlier ST/X releases, the new scheme allows for much more attributes and valueHolder-interaction to be defined on the GUIPainter level, with less need for explicit program code in #postBuild: or other methods.

As with JavaBeans, it should be noted that the the following is less a technology, but instead a set of conventions, which allows the component integration.

The scheme described here is backward compatible: existing widgets or applications need not be changed.
Only a few additional specifiaction methods are required, in order to make existing components pluggable.

PlugIn widgets

To be pluggable, a view must describe its exported aspects (channels), via a class-method named aspectSelectors, which must return a sequencable collection of symbols. For each symbol, corresponding set/get methods must be implemented in the instance protocol.

To plug in such a widget into a GUI, use an arbitrary component and connect the exported aspects (the sub-aspects) with your applications aspects in the SubAspects section of the GUI painter.

PlugIn subApplications

In a simular way, an application (i.e. derived from ApplicationModel) can be embedded as subCanvas, and its internal aspect holders be plugged to outer aspects holders.

This allows for dialogs, browsers or other components to be embedded in other applications.

To specify, which aspects are exported by an application, either manually edit the aspectSelectors class method, or use the UI-Painter (select the Exported Aspects tab).
The UI-Painters "save"-button function will generate an aspectSelectors method, if there are exported aspects.
Also, the "generate aspect methods" menu-function will generate setter-methods for all exported aspects.

PlugIn widget example

see CodingExamples_GUI::ArbitraryComponentDemo3.

PlugIn subApplication example

see CodingExamples_GUI::ArbitraryComponentDemo4
and the plugin in CodingExamples_GUI::ArbitraryComponentDemo4SubApp.


Copyright © 2000 eXept Software AG, all rights reserved

<info@exept.de>

Doc $Revision: 1.9 $ $Date: 2016/07/11 09:24:05 $