OnSGWorldMessage

TerraExplorer can notify the client when a message object is about to be triggered. The client can then either handle the message itself or let TerraExplorer handle it.

The value returned in SourceObjectID determines how the MessageID is interpreted.

 

JavaScript

 

OnSGWorldMessage(

       MessageID,

       SourceObjectID)

 

C#

 

bool OnSGWorldMessage(

       string MessageID,

       string SourceObjectID)

 

C++

 

HRESULT OnSGWorldMessage(

       [in] BSTR MessageID,

       [in] BSTR SourceObjectID,

       [out, retval] VARIANT_BOOL* pbHandled)

Parameters

MessageID

This value is interpreted based on the returning value of SourceObjectID below:

SourceObjectID

The ID of any of the following:

·          If sent by an ITerraExplorerObject80 derived object – The ID of the object that owns the message object that is about to be triggered.
In this case, the MessageID is the ID of the message object that is about to be triggered.

·          If sent by IWindow80.ShowMessageBarText– “MessageBarText”. In this case, the MessageID contains the message text.

·          If sent by non- ITerraExplorerObject80 derived object – “ContainerMessage”. In this case, the MessageID contains the ID of a temporary message object that can only be accessed during the scope of the event.

·          If sent during Fly file load – “LoadFlyContainer”. In this case, MessageID contains a string combined from the container number, followed by a colon (“:”), followed by the URL to display.

Return Value

pbHandled

A Boolean that indicates whether or not the client handled the message itself and does not wish TerraExplorer to display the message. The value is FALSE when TerraExplorer handled the message.