Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Cyberdog Programmer's Kit / Part 3 - Cyberdog Reference
Chapter 7 - Classes and Methods


SimpleCyberService

Superclasses
CyberService
Subclasses
none
An object of the SimpleCyberService class represents a simple implementation of a service.

Description

The SimpleCyberService class provides a simple, resource-driven implementation of a Cyberdog service. SimpleCyberService is a fully implemented class that you can use as is or subclass. It overrides every method of CyberService except for CyberMenuFocusAcquired and CyberMenuFocusLost. SimpleCyberService has one method that is not an override of a CyberService method, DoMenuItemSelected.

The SimpleCyberService override of the ICyberService method reads and caches data from the various resources referenced by the 'srvc' resource; the other SimpleCyberService overrides use those cached values. For a description of the format of the 'srvc' resource, see (page 177). The file CyberService.r contains an example of the 'srvc' format.

The only SimpleCyberService behavior that is not fully implemented is the handling of menu item selections. The SimpleCyberService object 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 the SimpleCyberService override of the DoCyberMenuCommand method, which translates the menu command ID into a index and calls the DoMenuItemSelected method.

Methods

The SimpleCyberService class has a single method, DoMenuItemSelected. A detailed description of the method follows.

DoMenuItemSelected
Performs the selected menu command.

Methods
DoMenuItemSelected

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996