getMessageByID( msgId ) method

Gets a hwc.Message object with the given message ID.

Syntax

<static> getMessageByID( msgId ) → {hwc.Message}

Parameters

Name Type Description
msgId number The message ID of the message to get.

Returns

A message object, or null if no message with given ID.

Type:

hwc.Message

Example

// A message listener is one place that would likely need to call hwc.getMessageByID.
var messageListener = function( flag, messageID )
{
   // Since the callback function only gets the messageID, not the message itself, if we want
   // more information about the message we must call hwc.getMessageByID.
   var message = hwc.getMessageByID( messageID );
   if( message.getSubject() == "a special subject" )
   {
      alert( "An event occured for a special message!" );
   }
}
hwc.addMessageListener( null, messageListener );

Source

hwc-api.js, line 3034.