Hi,
1)
How I can detect that the settings import failed and so settings were not imported? The Do() method of "op.settings.import" returns S_OK also if the source file does not exist or it is in invalid format.
2)
I noticed that IPXV_Control properties 'VisibleCmdPanes', 'LockedCmdPanes', 'LockedCmdBars' and 'VisibleScrollbars' are not saved/loaded via "op.settings.export/import". Is there some way how to save them via Editor SDK?
Settings import/export
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
Re: Settings import/export
Hello anovy,
Can you please send us a small working project where we can debug this problem?
Cheers,
Alex
Can you please send us a small working project where we can debug this problem?
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 164
- Joined: Mon Feb 08, 2010 8:48 am
Re: Settings import/export
Hi,
Regarding 1) here is a sample source code in C++ (no error or pointer checking here for simplicity). The code is taken from your C# SDK example and rewritten to C++.
Then op->Do(0) returns S_OK also if the file (as given by filepath) does not exist or if the file is in invalid format.
Regarding 2) you can check this directly in your C# SDK example project. If you export/import settings on the Setting I/O panel, then you will see that the properties listed above are not saved/restored (these are first four properties on the View panel).
Regarding 1) here is a sample source code in C++ (no error or pointer checking here for simplicity). The code is taken from your C# SDK example and rewritten to C++.
Code: Select all
BOOL LoadSettings(IPXV_Inst *pinst,LPCTSTR filepath)
{
IOperationPtr op=pinst->CreateOp(pinst->Str2ID("op.settings.import",VARIANT_FALSE));
ICabNodePtr root=op->Params->Root;
root->Item["Options.History"]->v=true;
root->Item["Input"]->Unknown=pinst->GetExtension("AFS")->DefaultFileSys->StringToName(_bstr_t(filepath),0,NULL);
return op->Do(0)==S_OK;
}
Regarding 2) you can check this directly in your C# SDK example project. If you export/import settings on the Setting I/O panel, then you will see that the properties listed above are not saved/restored (these are first four properties on the View panel).
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
Re: Settings import/export
Hello anovy,
It appears that it's a bug in the operation - thanks for noticing. We will try to fix this asap.
As for the 2, these things should also be saved. The thing is that we do save the settings correctly - just tried importing these settings into the End-User Editor - everything worked smoothly. I will asked a developer who implemented this feature and will reply.
Cheers,
Alex
It appears that it's a bug in the operation - thanks for noticing. We will try to fix this asap.
As for the 2, these things should also be saved. The thing is that we do save the settings correctly - just tried importing these settings into the End-User Editor - everything worked smoothly. I will asked a developer who implemented this feature and will reply.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ