ClassesClasses | | Operators

set_message_paramT_set_message_paramSetMessageParamSetMessageParam (Operator)

Name

set_message_paramT_set_message_paramSetMessageParamSetMessageParam — Set message parameter or invoke commands on the message.

Signature

set_message_param( : : MessageHandle, GenParamName, Key, GenParamValue : )

Herror T_set_message_param(const Htuple MessageHandle, const Htuple GenParamName, const Htuple Key, const Htuple GenParamValue)

void SetMessageParam(const HTuple& MessageHandle, const HTuple& GenParamName, const HTuple& Key, const HTuple& GenParamValue)

void HMessage::SetMessageParam(const HString& GenParamName, const HTuple& Key, const HTuple& GenParamValue) const

void HMessage::SetMessageParam(const HString& GenParamName, const HString& Key, const HTuple& GenParamValue) const

void HMessage::SetMessageParam(const char* GenParamName, const char* Key, const HTuple& GenParamValue) const

static void HOperatorSet.SetMessageParam(HTuple messageHandle, HTuple genParamName, HTuple key, HTuple genParamValue)

void HMessage.SetMessageParam(string genParamName, HTuple key, HTuple genParamValue)

void HMessage.SetMessageParam(string genParamName, string key, HTuple genParamValue)

Description

set_message_paramset_message_paramSetMessageParamSetMessageParamSetMessageParam sets message parameters or invokes action commands on the message.

For each call of set_message_paramset_message_paramSetMessageParamSetMessageParamSetMessageParam, only a single parameter can be set. However, there are two types of parameters/commands:

Key-independent parameter names:

'remove_all_keys'"remove_all_keys""remove_all_keys""remove_all_keys""remove_all_keys":

Removes all the keys currently stored in the message and releases all the (control or iconic) data associated with those keys. The operation results in an empty message. Note that contents of GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue is ignored for this parameter, while KeyKeyKeyKeykey must be an empty tuple.

Key-specific parameter names:

'remove_key'"remove_key""remove_key""remove_key""remove_key":

Removes the keys specified in the KeyKeyKeyKeykey parameter and releases all the (tuple or object) data associated with those keys. If an error occures while processing one or more keys (in particular if the key is invalid), the operator attempts to continue removing as many keys as possible before reporting the failure. Note that the contents of GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue is ignored for this parameter.

Execution Information

This operator modifies the state of the following input parameter:

The value of this parameter may not be shared across multiple threads without external synchronization.

Parameters

MessageHandleMessageHandleMessageHandleMessageHandlemessageHandle (input_control, state is modified)  message HMessage, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Message handle.

Number of elements: MessageHandle == 1

Restriction: MessageHandle != 0

GenParamNameGenParamNameGenParamNameGenParamNamegenParamName (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Names of the message parameters or action commands.

Number of elements: GenParamName == 1

Default value: 'remove_key' "remove_key" "remove_key" "remove_key" "remove_key"

List of values: 'remove_all_keys'"remove_all_keys""remove_all_keys""remove_all_keys""remove_all_keys", 'remove_key'"remove_key""remove_key""remove_key""remove_key"

KeyKeyKeyKeykey (input_control)  string(-array) HTupleHTupleHtuple (string) (string) (HString) (char*)

Message keys the parameter/command should be applied to.

Restriction: length(Key) > 0

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue (input_control)  tuple(-array) HTupleHTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)

Values of the message parameters or action commands.

Example (HDevelop)

* Remove some keys
set_message_param (Message, 'remove_key', ['my_image', 'simple_string'], [])

Result

If all the operator parameters, and their values, as well as specified keys are valid, set_message_paramset_message_paramSetMessageParamSetMessageParamSetMessageParam returns 2 (H_MSG_TRUE). Otherwise an exception is raised.

Possible Predecessors

dequeue_messagedequeue_messageDequeueMessageDequeueMessageDequeueMessage, create_messagecreate_messageCreateMessageCreateMessageCreateMessage

Possible Successors

enqueue_messageenqueue_messageEnqueueMessageEnqueueMessageEnqueueMessage, clear_messageclear_messageClearMessageClearMessageClearMessage

See also

create_messagecreate_messageCreateMessageCreateMessageCreateMessage, clear_messageclear_messageClearMessageClearMessageClearMessage, set_message_tupleset_message_tupleSetMessageTupleSetMessageTupleSetMessageTuple, get_message_tupleget_message_tupleGetMessageTupleGetMessageTupleGetMessageTuple, set_message_objset_message_objSetMessageObjSetMessageObjSetMessageObj, get_message_objget_message_objGetMessageObjGetMessageObjGetMessageObj, get_message_paramget_message_paramGetMessageParamGetMessageParamGetMessageParam, enqueue_messageenqueue_messageEnqueueMessageEnqueueMessageEnqueueMessage, dequeue_messagedequeue_messageDequeueMessageDequeueMessageDequeueMessage

Module

Foundation


ClassesClasses | | Operators