Copy link to clipboard
Copied
hi all,
filename: refresh.mm
(IBAction)refreshSelectedTab:(NSButton *)sender {
{
callRefresh();
}
@CatCH(NSException *err)
{
NSLog(@"Err:%@",err.description);
}
}
the above code i used to refresh the panel after clicking it on refresh button.
the panel i have created using objective-c
so i called callRefresh(); from objective-c to c++
file name:plugin.cpp
void callRefresh()
{
RetrieveDocumentDetails();
}
in the above code i have called RetrieveDocumentDetails(); to retrieve the document name and document colormodel details
file name:plugin.cpp
ASErr RetrieveDocumentDetails() {
AIDocumentHandle cDocument;
sAIDocument->GetDocument(&cDocument);
ai::UnicodeString documentName("");
sAIDocument->GetDocumentFileName(documentName);
std::string documentFileName = documentName.as_UTF8();
ai::int16 documentColorModel=0;
sAIDocument->GetDocumentColorModel(&documentColorModel);
}
in the above code i have used to retrieve the document name and color model details..
while retrieving document name and color models details in the function RetrieveDocumentDetails(); that is function called from objective-c to c++ , the details are not getting retrieved .
if i call the function RetrieveDocumentDetails(); without calling it from objective-c , the details will get retrieve..
if call the function RetrieveDocumentDetails(); using objective-c the details are not get retrieving .
please anyone kindly help me to solve this problem...
Thank you
You may have a context problem. See this thread for a solution if that's the case:
Copy link to clipboard
Copied
You may have a context problem. See this thread for a solution if that's the case:
Copy link to clipboard
Copied
hi @A. Patterson thanks for your reply
it works retrieving details
but crashing while retrieving details
is there any solution to solve this
Copy link to clipboard
Copied
thank you @A. Patterson
it really worked..