SetMessageSink

Description

Specifies a visual object that will receive event notifications from user events with the pbm_command event ID.

Applies to

NotificationBubble objects

Syntax

Integer controlname.SetMessageSink ( sinkWindow )

Argument

Description

controlname

The name of the notification bubble that has a user event with the pbm_command event ID

sinkWindow

GraphicObject that you want to have receive event notifications

Returns

Integer. Returns 1 for success and -1 if an error occurs.

Usage

The NotificationBubble object contains HTML text that can include input controls with a command ID and number as a name attribute. For example, the HTML text could include the following command button element:

<input type=button name="cmd:10" value="OK">

If you create a user event on the NotificationBubble object with a pbm_command event ID, the event will be triggered when an application user taps the OK command button. Notification of the user action will be set to the visual object that you name in the sinkWindow argument.

Command IDs in the NotificationBubble’s HTML text typically have values of 3 or greater. A value of cmd:1 sends a notification, but does not close the notification bubble. A value of cmd:2 closes the notification bubble but does not remove the notification from the notification tray, making it ideally suitable as the command ID for a Cancel button.

Examples

Example 1

The following example sets the parent window of a notification bubble object to receive notifications from a user event:

li_rtn = nb_myBubble.SetMessageSink(parent)

See also