MemberUpdate (open)
Update a member in an object
Syntax
// Core function, no LOADLIB necessary
MACRO MemberUpdate(OBJECT obj, STRING membername, VARIANT value)Parameters
OBJECT objObject to modify
STRING membernameThe name of the member to update
VARIANT valueThe new value for the member
Description
SetMember updates the specified member in the object. Member names are case-insensitive. SetMember can be used to update members with a dynamically generated name.
If the member does not exist in @italic obj, or @italic newvalue is of an incompatible type, an error is generated.
Examples
// Retrieve a file object, and add exclamation points to its title
OBJECT myfile := FindFile(15);
myfile := MemberUpdate(myfile, "title", myfile.title || "!!!");