SCLOrkChatMessage:
Filter:
SCLOrkTools/Classes (extension) | Quarks > SCLOrkTools

SCLOrkChatMessage
ExtensionExtension

Wrapper class for a chat message in the SCLOrkChat system.

Description

Class Methods

.new

Construct, initialize, and return a new SCLOrkChatMessage object.

Arguments:

senderId

The integer id of the sender of this message.

recipientIds

A list of integer ids of the intended recipients of the message. There needs to be at least one element in the list, and if the first element of the list is the special broadcast userId of 0 the message is intended for all connected clients.

type

A label enumerated type of the message, supported types documented in SCLOrkChat-OSC-Command-Reference: Message Types.

contents

A string with the text contents of the chat message.

senderName

Optional argument, not part of the chat message wire format, the string name associated with the senderId.

isEcho

Optional argument, not part of the chat message wire format, a boolean describing if this is an echo from the server or a new message.

Returns:

A new SCLOrkChatMessage object.

Instance Methods

.senderName

A string containing the associated name of the senderId, not part of the wire format is an optional value and may be nil.

.postln

Convenience utility method to print the wire format values only of the object to the post window.

.isEcho

A boolean. Not part of the wire format, but if true indicates that this message was received as an echo from the server.

.recipientIds

An Array of recipiendIds that the message was intended for. If the first element of the array is 0 then this was a broadcast message sent to all connected clients.

.contents

A string containing the text contents of the message.

.recipientNames

An array containing the string names associated with the integer values in recipientIds. May be nil, not part of the wire format.

.senderId

An integer with the userId of the sending client.

.type

A label decribing the enumerated type of the message, supported types documented in SCLOrkChat-OSC-Command-Reference: Message Types.