KB-28399: Creating indexed screens.

Question:

How can I create one single graphic object to command several engines?

Solution:

This requires creating library objects. To do so, follow these procedures:

1. Create an XObject (EngineData in the example) that receives all the engine’s default values in its properties.

2. Create an XControl (XEngine in the example) to stand for the engine’s command object interface. This XControl will have an XObject-type property (DataSource in the example). Additionally, in the event calling the commands screen (at the engine’s figure’s Click() event, for example), add the following script:

  Arg = XEngine.DataSource.PathName
  Application.DoModal “IndexedStatusScreen”, , , , , , Arg

3. Save and register the library.

4. In a server data folder, add as many XObjects as there are engines in the application.

5. On the preferred screen, add the desired XControls and link them (at DataSource property) to the respective XObjects in the data folder.

6. Create a generic screen (IndexedStatusScreen in the example), and at OnPreShow() event, add the script passing the name of the XObject corresponding to the XControl clicked on the previous screen.

When clicking any engine on InitialScreen as the application is running, the PathName property of the XObject linked to this XControl will be attributed to Arg variable. The command that opens the generic screen (IndexedStatusScreen) will also be executed.

When opening the generic screen, the script passing Arg variable’s value (containing the XObject’s PathName property) to the property(ies) of the object(s) showing server data will be executed at OnPreshow() event.

Attachments:

5175

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *