DocSetUserDataΒΆ
With DocSetUserData a UniScript object can be linked to a document.
-
bool = DocSetUserData(hDoc, objUserData)
Return Value
Is TRUE (1), if the function was successful and otherwise FALSE (0).
Parameters
-
hDoc
Identifies the document.
-
objUserData
objUserData is the UniScript object, see obj_create.
Example
def test_DocSetUserData()
{
if (version(1) < 5200) return;
hDoc = DocCreate()
DocSetUserData(hDoc, [. a = 1234]);
if (DocGetUserData(hDoc).a != 1234) {
error();
}
if (_g().unit_test_cleanup) {
DocDestroy(hDoc);
}
}
test_DocSetUserData();
History
Version | Description |
---|---|
5.20 | New. |
id-699381