Adding Custom Messages

 
 
 

Most add-ins will make use of the Messages supplied with the SDK, but there are instances where you will want to add your own custom Messages to the system. For example, consider an add-in that you wish to control from a web page or a remote UI. In this case, you could add your own custom Messages to the Showcase Message Passing Architecture. The remote UI could issue custom Action Messages, just as it would for those built in to Showcase. The Showcase Message Passing Architecture will receive the custom Messages, and send them to your custom add-in, as required, which can carry out the actions specified in its body.

Adding custom Messages is straightforward:

  1. Register the new Message with the Showcase Message Registry.

    See Registering Messages.

  2. Within the add-in, add code to instantiate a Message interpreter to handle the message.

    See Handling Messages (Message Interpreters).

  3. Submit Messages to Showcase in the prescribed format, using the custom Message ID you registered.

    See Message Sending in Python.

  4. Showcase adds the custom Message to the Message Queue, where it is handled in the same way as all other Messages.

For details on creating, registering and documenting custom messages, see Creating New Messages.