v8 vs v9 : IPXV_View (Get_StateFlags, IsDuplicate, OnBeforeSaveSession and Close)  SOLVED

PDF-XChange Editor SDK for Developers

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.
Post Reply
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

v8 vs v9 : IPXV_View (Get_StateFlags, IsDuplicate, OnBeforeSaveSession and Close)

Post by zarkogajic »

Hi Support,

Moving from v8 to v9...

IPXV_View has 4 additional methods to be implemented (for my custom Pane code): Get_StateFlags, IsDuplicate, OnBeforeSaveSession and Close.

Can you provide more info on those 4?

-žarko
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: v8 vs v9 : IPXV_View (Get_StateFlags, IsDuplicate, OnBeforeSaveSession and Close)

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

When we are talking about the IPXV_DocumentView, then:
get_StateFlags will return PXV_ViewState_Modified when the IPXV_Document is modified.
IsDuplicate - used for checking whether the given view is a duplicate of the passed view. It will first compare the view pointers, then the IDs and then the IPXV_Documents. If neither are equal then it's not a duplicate.
OnBeforeSaveSession - will check for save before close. First it will fire the e_document_applyCachedChanges event, then if the IPXV_Document is closing right now it will fire the id_e_document_beforeClose event. After that if the document is not modified it will return here. If the document is modified it will call the IPXV_Document::Save method.
This is now being called when all of the documents are being closed when the last session is being restored by the End-User Editor only.
Close - will close the current view.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Re: v8 vs v9 : IPXV_View (Get_StateFlags, IsDuplicate, OnBeforeSaveSession and Close)

Post by zarkogajic »

Hi Alex,

Thanks.

And what if we are talking about creating custom panes : https://github.com/tracker-software/PDFEditorSDKExamples/tree/master/CSharp/CustomPane

How would you implement those 4 methods in "CustomPaneContainer"?

p.s.
Actually asking to update that sample :)

-žarko
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: v8 vs v9 : IPXV_View (Get_StateFlags, IsDuplicate, OnBeforeSaveSession and Close)

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

For custom panes - you can skip implementing those - they won't be needed in that case.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Re: v8 vs v9 : IPXV_View (Get_StateFlags, IsDuplicate, OnBeforeSaveSession and Close)  SOLVED

Post by zarkogajic »

Hi Alex,

All clear, thanks!

-žarko
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

v8 vs v9 : IPXV_View (Get_StateFlags, IsDuplicate, OnBeforeSaveSession and Close)

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply