Setting document tags (labels?) from C++ to be accesses from JSX
Hi,
I want to be able to set label on the document from my C++ plugin to that the same can be accessed from the jsx file.
IDocument* doc = GetIDocument(...)
UIDRef ownerUID = doc->GetDocWorkSpace();
Later during the persisting command execution I have code similar to the following
UIDRef owner = GetItemList()->GetRef(0);
InterfacePtr<IStringData> stringData(this, UseDefaultIID());
CHECK_BREAK(stringData);
PMString stringToWrite = stringData->Get();
InterfacePtr<I> persist(owner, UseDefaultIID());
CHECK_BREAK(persist);
persist->SetString(stringToWrite);
InterfacePtr<IScript> script(owner, UseDefaultIID());
if (script) {
PMString key = WrapperUtils<IUtilitiesWrapper>()->MakePMString(L"MyPluginLabelInfo");
script->SetTag(key, stringToWrite);
}
The 'script' pointer is coming as null while it works perfectly well for Page Items such as Text. What is the correct way to assign Tags (labels?) in the above persist implementation so that the information can be accesses from the jsx script?
Thanks,