"Docs.SingleWnd" setting not saved

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Paul - Tracker Supp, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software

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.
Post Reply
anovy
User
Posts: 164
Joined: Mon Feb 08, 2010 8:48 am

"Docs.SingleWnd" setting not saved

Post by anovy » Sat Jan 06, 2018 8:20 pm

Hi,
I noticed that with the latest build the setting "Docs.SingleWnd" is probably not saved in the configuration file (using the "op.settings.export" operation).

In the old build which I used (6.0.319.0) this worked ( "op.settings.export" saved this setting and "op.settings.import" read and correctly restored this setting).

The new build (6.0.322.7?) reads and correctly restores this setting from the configuration file saved by the old build, but when this new build exports the settings, then it seems that the "Docs.SingleWnd" setting is not saved (because the next import does not restore this setting).

BTW:
The size of the exported configuration file for the new build is about one third of the configuration file size for the old build. So maybe the number of unsaved settings is even larger? If so what changed and why (maybe this was intent)?

BTW2:
I'm not sure if the number of the new build is really 6.0.322.7. This number was stated on your web when I downloaded the build. However the editor About box says it is version 7.0, build 323.2. So I'm somewhat confused about this mismatch (the old build number 6.0.319.0 perfectly matches its About box).

User avatar
Sasha - Tracker Dev Team
User
Posts: 4400
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: "Docs.SingleWnd" setting not saved

Post by Sasha - Tracker Dev Team » Tue Jan 09, 2018 8:58 am

Hello anovy,

Can you recreate this behavior in the latest version of the End-User Editor?
Also, we had our settings system changed a little:
https://www.tracker-software.com/forum3 ... 89#p118684

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

anovy
User
Posts: 164
Joined: Mon Feb 08, 2010 8:48 am

Re: "Docs.SingleWnd" setting not saved

Post by anovy » Tue Jan 09, 2018 2:20 pm

The current end-user editor (7.x version) saves this to registry:
HKEY_CURRENT_USER\Software\Tracker Software\PDFXEditor\3.0\Settings\Docs\b.SingleWnd

The older SDK versions (6.x) saved this also via "op.settings.export" to XCS files. The new SDK (7.x version) apparently not.

So the question is why and what other settings were removed from "op.settings.export" in the new SDK.

Generally I can live with this (although I don't understand this and it is unwanted complication), however then I need to know what parameters are saved via "op.settings.export" and what should be suddenly saved separately by the developer (e.g. to registry).

Or maybe the SDK contains some other (new) method how to save these omitted settings?

Or maybe there is a new option for "op.settings.export" (see https://sdkhelp.tracker-software.com/vi ... rt_Options) which must be turned on to continue saving these omitted settings?

User avatar
Sasha - Tracker Dev Team
User
Posts: 4400
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: "Docs.SingleWnd" setting not saved

Post by Sasha - Tracker Dev Team » Tue Jan 09, 2018 2:39 pm

Hello anovy,

Can I get a small sample that I can test and find a possible solution/explanation?

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

anovy
User
Posts: 164
Joined: Mon Feb 08, 2010 8:48 am

Re: "Docs.SingleWnd" setting not saved

Post by anovy » Tue Jan 09, 2018 11:33 pm

Hi,
You can test the behavior directly in your C# FullDemo application which is provided with editor SDK. The test is quick and straightforward (although my explanation probably not - sorry).

Simply run the demo first with 6.x version. Then in Document tab check the 'Multiple documents mode' checkbox (if it is not already checked). Go to Settings I/O tab and use the Save function in Import/Export Settings group. After the settings file will be saved (it invokes the btnSettSave_Click function in MainFrm.cs and here uses the "op.settings.export" operation) then go to back to the Document tab and now uncheck the 'Multiple documents mode' checkbox. Then go to again to the Settings I/O tab and use the Load function on the just saved settings file (it invokes the btnSettLoad_Click function in MainFrm.cs and here uses the "op.settings.import" operation and immediately calls UpdateDocumentsOpts() function where 'Multiple documents mode' checkbox is set using the "Docs.SingleWnd" setting). After this go to back to the Document tab and you will see that the 'Multiple documents mode' checkbox is again checked, i.e. the "Docs.SingleWnd" setting was loaded via the "op.settings.import" operation and so it was certainly saved via the previous "op.settings.export" operation.

Then do the same procedure with the 7.x version. And you will see that at the end of this procedure the 'Multiple documents mode' checkbox will remain unchecked, i.e. the "Docs.SingleWnd" setting was not restored (you can do this test also in opposite manner, i.e. with the 'Multiple documents mode' checkbox saved as unchecked and you will always see that the settings import operation leaves this checkbox unchanged). There are two possible explanation - either the "op.settings.export" operation did not save the "Docs.SingleWnd" setting or the "op.settings.import" operation did not load this setting. I experimentally recognized that most probably the first option is true, because if the 7.x version imports configuration file exported by the 6.x version, then the "Docs.SingleWnd" setting is read and correctly set.


And now some mystery for me:
The FullDemo application allows to configure (in the Settings I/O tab) that it automatically saves and restores the settings at program exit and start. This can be done either to registry or to the disk settings file. If the disk settings file is used (local file option), then the settings saved by this way works correctly for the "Docs.SingleWnd" setting also in the 7.x version. However this setting file is not created by the "op.settings.export" operation and in fact it is not XCS format (i.e. zip file containing configuration files in pdf format), it is just configuration file in pdf format. And I found that the path of this configuration file is pUserSettingsSrc parameter of the IPXV_Inst::Init method.

So it is obvious that the settings saved internally by the control via the pUserSettingsSrc parameter differ from settings saved via the "op.settings.export" operation. Could you please provide some explanation about this? I.e. why there are two different methods and what method for save settings (if I want to save to a disk file) to use and when.

Thank you.

User avatar
Sasha - Tracker Dev Team
User
Posts: 4400
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: "Docs.SingleWnd" setting not saved

Post by Sasha - Tracker Dev Team » Wed Jan 10, 2018 10:51 am

Hello anovy,

Searched through code - there were some changes indeed on this setting in case of the SDK - i wrote to one of our lead devs - he should provide a further explanation.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

User avatar
Sasha - Tracker Dev Team
User
Posts: 4400
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: "Docs.SingleWnd" setting not saved

Post by Sasha - Tracker Dev Team » Thu Jan 11, 2018 7:35 am

Hello anovy,

We've investigated the issue and it was fixed (the fix will be available from the next build).
Also, the developer, who is working on the Editor's settings recommended to use the SaveUserSettings/LoadUserSettings methods - it will be much more efficient in case of saving and loading program's settings that are stored in global settings. Of course if you want, for example, load/save custom stamps, custom digital signatures appearances or some other data that is stored in physical files on disk then you would have to use the import/export operations.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

anovy
User
Posts: 164
Joined: Mon Feb 08, 2010 8:48 am

Re: "Docs.SingleWnd" setting not saved

Post by anovy » Thu Jan 11, 2018 9:31 am

Hi,
I used import/export operations because they seems more efficient. In one simple call is created one compact configuration file (xcs format) which contains both user settings and history.

Moreover because there is no LoadHistory method (although SaveHistory yes), then there must be used custom IPXV_Inst::Init with pHistorySrc parameter (now I don't care about IPXV_Inst::Init/Shutdown, IPXV_Control does this job for me). I'm using C++ and because your demo samples are in C# and I'm not too familiar with C#, I'm not sure how to correctly apply the custom IPXV_Inst::Init/Shutdown in C++ (for example if the IPXV_Inst::Shutdown should be called before or after the IPXV_Control is released, if there should be called also IPXV_Inst::Release after IPXV_Inst::Shutdown etc.).

So I will investigate further and possibly will also ask further.

Thank you.

User avatar
Sasha - Tracker Dev Team
User
Posts: 4400
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: "Docs.SingleWnd" setting not saved

Post by Sasha - Tracker Dev Team » Thu Jan 11, 2018 9:54 am

Hello anovy,

Well if you are using C++ then congratulations - you have a full access to the possibilities of the SDK :)
Be sure to read this:
https://sdkhelp.tracker-software.com/view/PXV:CoClasses

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

anovy
User
Posts: 164
Joined: Mon Feb 08, 2010 8:48 am

Re: "Docs.SingleWnd" setting not saved

Post by anovy » Thu Jan 11, 2018 10:08 am

Yes, I know this link. As I wrote, I will do my new tests now, if something unclear, then I will ask again. Thank you.

User avatar
Sasha - Tracker Dev Team
User
Posts: 4400
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: "Docs.SingleWnd" setting not saved

Post by Sasha - Tracker Dev Team » Thu Jan 11, 2018 10:12 am

:)
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Post Reply