ITT Rule IDL Version 7.0 Manuel d'utilisateur Page 310

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 430
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 309
310 Chapter 13: Creating a User Interface Service
Example: Changing a Property Value iTool Developers Guide
PRO opName__define
struct = {opName, $
inherits IDLitDataOperation $
}
END
Discussion
Only two methods are required: Init and DoExecuteUI. Since this operation is based
on the IDLitDataOperation class, all interaction with the iTools undo/redo system is
automated.
Even though all of the items that are currently selected in the iTool are retrieved by
the GetSelectedItems method, only the first item is passed to the SrvExample user
interface service for processing. Handling multiple selected items would require a
more complicated user interface.
The process of defining an IDLitDataOperation is discussed in detail in Chapter 7,
“Creating an Operation”.
Registering the SrvExample Service
In order for the SrvExample user interface service to be available, it must be
registered with the current iTool. The following line in the iTools launch routine
allows the service to be called with the name “Example Service”:
ITREGISTER, 'Example Service', 'srvExample', /UI_SERVICE
Registering the opName Operation
To use the opName operation within an iTool, the operation must be registered in the
iTool’s definition. The following statement registers the operation with the name
“Property Name” and places it in the Operations menu of the iTool.
self->RegisterOperation, 'Property Name', 'opName', $
IDENTIFIER = 'Operations/PropertyName'
Invoking the opName Operation
To use the SrvExample service, the user would launch an iTool for which the
opName operation is registered, select an iTool component in the window, and select
Property Name from the Operations menu.
Vue de la page 309
1 2 ... 305 306 307 308 309 310 311 312 313 314 315 ... 429 430

Commentaires sur ces manuels

Pas de commentaire