Important: The information in this document is obsolete and should not be used for new development.
SimpleCyberService
An object of the
- Superclasses
CyberService- Subclasses
- none
SimpleCyberServiceclass represents a simple implementation of a service.Description
TheSimpleCyberServiceclass provides a simple, resource-driven implementation of a Cyberdog service.SimpleCyberServiceis a fully implemented class that you can use as is or subclass. It overrides every method ofCyberServiceexcept forCyberMenuFocusAcquiredandCyberMenuFocusLost.SimpleCyberServicehas one method that is not an override of aCyberServicemethod,DoMenuItemSelected.The
SimpleCyberServiceoverride of theICyberServicemethod reads and caches data from the various resources referenced by the'srvc'resource; the otherSimpleCyberServiceoverrides use those cached values. For a description of the format of the'srvc'resource, see (page 177). The fileCyberService.rcontains an example of the'srvc'format.The only
SimpleCyberServicebehavior that is not fully implemented is the handling of menu item selections. TheSimpleCyberServiceobject appends each of the strings specified in the menu'STR#'resource to the Cyberdog menu, registers each menu item with the menu bar, and enables each menu item. When one of the service's menu items is selected, Cyberdog calls theSimpleCyberServiceoverride of theDoCyberMenuCommandmethod, which translates the menu command ID into a index and calls theDoMenuItemSelectedmethod.Methods
TheSimpleCyberServiceclass has a single method,DoMenuItemSelected. A detailed description of the method follows.
DoMenuItemSelected- Performs the selected menu command.
Methods
- DoMenuItemSelected