Multiuser Lingo Dictionary > Multiuser Lingo Dictionary > getAttribute

 

getAttribute

Syntax

system.group.getAttribute [#group: "@groupName", #attribute: [#attributeName1, #attributeName2]]
system.DBPlayer.getAttribute [#userID: "userName", #application: "appName", #attribute: [#attributeName1, #attributeName2]]
system.DBUser.getAttribute [#userID: "userName", #attribute: [#attributeName1, #attributeName2]]
system.DBApplication.getAttribute [#application: "appName", #attribute: [#attributeName1, #attributeName2]]

Description

Multiuser Server command; obtains from the server the values of the given attributes for the given group or object. Attributes may contain any Lingo value. You must declare an attribute before it can be used. See declareAttribute.

Example

This statement gets the values of the attributes #accountBalance and #cardHand for the user Bob in the movie Poker:

errCode = gMultiuserInstance.sendNetMessage("system.DBPlayer.getAttribute", "anySubject", [#userID: "Bob", #application: "Poker", #attribute: [#accountBalance, #cardHand]])

The server's response looks like this:

[#errorCode: 0, #recipients: ["userName"], #senderID: "system.DBPlayer.getAttribute", #subject: "anySubject", #content: ["Bob": [#accountBalance: 3500, #cardHand: "Royal Flush", #lastUpdateTime: "2001/08/26 12:43:33.070364"]], #timeStamp: 7025771]

See also

setAttribute, sendNetMessage(), declareAttribute