Hi Support,
How do I get the PXV_DocCloseFlags from the e.document.beforeClose event?
When I do IPXV_Document::Close(flags) I also react on the e.document.beforeClose - but pEvent.Param1 and Param2 are both zero (0) never mind what PXV_DocCloseFlags I set.
-žarko
PXV_DocCloseFlags in e.document.beforeClose SOLVED
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: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
-
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: PXV_DocCloseFlags in e.document.beforeClose
No way at the moment to get such flags fro this event. Now you have only this
bool bAllowCancel = pEvent.Param1 != 0;
bAllowCancel - if true then you can prevent closing doc by:
bool bAllowCancel = pEvent.Param1 != 0;
bAllowCancel - if true then you can prevent closing doc by:
Code: Select all
if (bAllowCancel)
{
pEvent.Handled = true;
pEvent.Result = 1; // any non-zero
}
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: PXV_DocCloseFlags in e.document.beforeClose
Hi Vasyl,
Ok, thanks.
Any chance to add PXV_DocCloseFlags value to that event (and also allow *not* closing even if pEvent.Param1 == 0)?
Seems that Param1 != 0 when closing using UI (File-Close, or Tab-"Close"), but == 0 when closing using IPXV_Document.Close (NEVER_MIND_WHAT).
-žarko
Ok, thanks.
Any chance to add PXV_DocCloseFlags value to that event (and also allow *not* closing even if pEvent.Param1 == 0)?
Seems that Param1 != 0 when closing using UI (File-Close, or Tab-"Close"), but == 0 when closing using IPXV_Document.Close (NEVER_MIND_WHAT).
-žarko
-
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: PXV_DocCloseFlags in e.document.beforeClose
In the next build you will be able to get PXV_DocCloseFlags value from pEvent.Param2.Any chance to add PXV_DocCloseFlags value to that event
Surry, but no. When app(or one dev) decided to close doc without any interaction with user - it cannot be stopped by other dev.and also allow *not* closing even if pEvent.Param1 == 0
Hmm, seems the doc.Close(PXV_DocClose_AllowCancel) sends the pEvent.Param1!= 0. Can you double-check this?but pEvent.Param1== 0 when closing using IPXV_Document.Close (NEVER_MIND_WHAT).
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: PXV_DocCloseFlags in e.document.beforeClose SOLVED
Thanks. Ok. Will check
-ž
-ž
-
- Site Admin
- Posts: 1797
- Joined: Mon Jan 15, 2018 9:01 am