getBodyTuple

getBodyTuple(tuplename: String;
             value:     Any output): Boolean;

The getBodyTuple method of the JadeGenericMessage class scans the text in the message body for a tuple with the name specified by the tuplename parameter and places the corresponding value in the variable passed to the method as the value parameter. The method returns true if the tuple is found.

An exception is raised if the type of the variable passed as the value parameter does not match the type of the tuple. A variable of type Any is compatible with all tuple values.

An exception is raised if the format property of the message is not "JadeTpls", or the message body does not match the format generated by the appendBodyTuple method.

In the following code fragment, the value of a tuple called "name" is retrieved by using the getBodyTuple method and stored in a string variable.

msg.getBodyTuple("name", str);
txtName.text := str;