GWCommand

Defines an instance of a command.

Properties

The following table lists the properties for this class, along with access and descriptions.

Property

Access

Description

BaseCmd

R/O

GWCommand. Returning an error is equivalent to returning NULL, which is legal.

LongPrompt

R/O

String. Only commands generated and placed on the menu/toolbar with CommandFactory::CustomizeXXX call this method. Returning an error is equivalent to returning NULL, which is legal.

Parameters

R/O

Always NULL.

PersistentID

R/O

String.

ToolTip

R/O

String. Only commands generated and placed on the toolbar with CommandFactory::CustomizeToolbar (or explicitly added by the user) call this method. Returning an error is equivalent to returning NULL, which is legal.

Methods

Execute( )
Help( )
  • Invokes help for the GWCommand. Though the GroupWise client does not invoke this method, C3POServers are nevertheless required to implement it because other (add-on) C3PO clients may invoke it.
Undo( )
  • Required method. Not called in GroupWise 5.x and 6.x. Though the GroupWise client does not invoke this method, C3POServers are nevertheless required to implement it because other (add-on) C3PO clients may invoke it.
Long Validate( )
  • Called to determine the state of a C3PO command. The command is assumed by default to be in an enabled, unchecked, visible state. The C3PO provider can then modify that assumption by returning flags. The available flags are:

eGW_CMDVAL_CHECKED

The command has a check mark.

eGW_CMDVAL_DISABLED

The command is disabled.

  • Validate applies only to commands placed on the toolbar or menu by the C3POServer. Predefined commands do not cause this method to be invoked.
  • If the C3PO returns an error, the command is assumed to be disabled and unchecked.

Remarks

When GWCommand objects are associated with menu items, such as when CommandFactory::ModifyMenu is called, the lifetime of the command will parallel that of the menu.