Order of e.document.* events (strange case with an XFA)
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
Order of e.document.* events (strange case with an XFA)
Hi Support,
When looking at the following events: e_document_initialized, e_pagesView_ready, e_documentView_ready and e_document_activated, the order how events are fired for a newly opened document is how I ordered them.
I have a strange case with one XFA document, where the order of events fired is:
e_document_initialized
*e_document_activated*
e_pagesView_ready
e_documentView_ready
This happens when a message dialog appears stating some web service (XFA uses) cannot be reached. The tab for a document is created and visible, but the document view area does not yet display the document, something like:
What's strange is that inside e_document_activated the document's ActiveView: (IPXV_DocumentView) *is* assigned (not null), even though e_documentView_prepare / e_documentView_ready are not yet fired.
So, in the above case I'm missing an event when a DocumentView is created / accessible for a document, after e_document_initialized but before e_document_activated.
Even more strange, this out-of-order ordering happens only if this document is the first document loaded. If a "normal" document is open before this XFA, and then this XFA, the order of events is as expected (e_document_activated after e_documentView_ready for the XFA).
Any idea what's happening here?
The thing is that I need e_documentView_ready (or similar) event to get to document's ActiveView as this allows me to know in what MainView (/MainFrame) the document is being loaded via GetMainViewFromUIObj(). And I need this *before* e_document_activated.
p.s.
The XFA document does not have open actions or similar. So, e_document_beforeRunOpenScripts is not fired for it.
p.s.2
It is possible (?) that the ordering has changed in the last 2 releases - but to be 100% sure I would have to go back in time, install older versions etc ... so better if I do not have to do this ...
-žarko
When looking at the following events: e_document_initialized, e_pagesView_ready, e_documentView_ready and e_document_activated, the order how events are fired for a newly opened document is how I ordered them.
I have a strange case with one XFA document, where the order of events fired is:
e_document_initialized
*e_document_activated*
e_pagesView_ready
e_documentView_ready
This happens when a message dialog appears stating some web service (XFA uses) cannot be reached. The tab for a document is created and visible, but the document view area does not yet display the document, something like:
What's strange is that inside e_document_activated the document's ActiveView: (IPXV_DocumentView) *is* assigned (not null), even though e_documentView_prepare / e_documentView_ready are not yet fired.
So, in the above case I'm missing an event when a DocumentView is created / accessible for a document, after e_document_initialized but before e_document_activated.
Even more strange, this out-of-order ordering happens only if this document is the first document loaded. If a "normal" document is open before this XFA, and then this XFA, the order of events is as expected (e_document_activated after e_documentView_ready for the XFA).
Any idea what's happening here?
The thing is that I need e_documentView_ready (or similar) event to get to document's ActiveView as this allows me to know in what MainView (/MainFrame) the document is being loaded via GetMainViewFromUIObj(). And I need this *before* e_document_activated.
p.s.
The XFA document does not have open actions or similar. So, e_document_beforeRunOpenScripts is not fired for it.
p.s.2
It is possible (?) that the ordering has changed in the last 2 releases - but to be 100% sure I would have to go back in time, install older versions etc ... so better if I do not have to do this ...
-žarko
You do not have the required permissions to view the files attached to this post.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
Re: Order of e.document.* events (strange case with an XFA)
Hello zarkogajic,
Forwarded this one to Vasyl - hopefully he can tell more.
Cheers,
Alex
Forwarded this one to Vasyl - hopefully he can tell more.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Order of e.document.* events (strange case with an XFA)
Hi Alex,
Thanks.
I just went back to 352 version, and the event order *is* different (when compared to 354) for that particular document.
The event order is:
e_document_initialized
e_pagesView_ready
e_documentView_prepare/e_documentView_ready
e_pagesView_ready (2nd time! but a different instance)
e_document_activated
-žarko
Thanks.
I just went back to 352 version, and the event order *is* different (when compared to 354) for that particular document.
The event order is:
e_document_initialized
e_pagesView_ready
e_documentView_prepare/e_documentView_ready
e_pagesView_ready (2nd time! but a different instance)
e_document_activated
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
Re: Order of e.document.* events (strange case with an XFA)
Hello zarkogajic,
Notified Vasyl about this again, he'll take a look when he has time
Cheers,
Alex
Notified Vasyl about this again, he'll take a look when he has time
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Order of e.document.* events (strange case with an XFA)
Hi Support,
Any info here?
-ž
Any info here?
-ž
-
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Order of e.document.* events (strange case with an XFA)
Hi zarko.
Unfortunately, but I cannot reproduce this wrong order of events in Editor, nor in our FullDemo. Here I got the following events order:
e.document.initialized
e.pagesView.initialized
e.documentView.initialized
e.pagesView.ready
e.documentView.prepare
e.documentView.ready
e.document.viewingStarted
e.document.activated
...
The simple example project(or document, if issue is document-related) with reproducible case will be helpful..
Cheers.
Unfortunately, but I cannot reproduce this wrong order of events in Editor, nor in our FullDemo. Here I got the following events order:
e.document.initialized
e.pagesView.initialized
e.documentView.initialized
e.pagesView.ready
e.documentView.prepare
e.documentView.ready
e.document.viewingStarted
e.document.activated
...
The simple example project(or document, if issue is document-related) with reproducible case will be helpful..
Cheers.
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: Order of e.document.* events (strange case with an XFA)
Hi Vasly,
I can send the document, but not here (publicly).
Where to upload?
-žarko
I can send the document, but not here (publicly).
Where to upload?
-žarko
-
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Order of e.document.* events (strange case with an XFA)
Please send it support@pdf-xchange.com, and with simple reference to this topic. Thanks.
Also let me confirm: does this look like a document-related problem to you? Does the order of such event documents change when you open different XFA documents?
Also let me confirm: does this look like a document-related problem to you? Does the order of such event documents change when you open different XFA documents?
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: Order of e.document.* events (strange case with an XFA)
Hi Vasyl,
Document sent to email.
-žarko
Document sent to email.
YES.does this look like a document-related problem to you? Does the order of such event documents change when you open different XFA documents?
-žarko
-
- Site Admin
- Posts: 17949
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: Order of e.document.* events (strange case with an XFA)
Hello zarkogajic,
Thanks for the files! We got those and have forwarded them to Vasyl and Sasha!
Kind regards,
Stefan
Thanks for the files! We got those and have forwarded them to Vasyl and Sasha!
Kind regards,
Stefan
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Order of e.document.* events (strange case with an XFA)
Hi Support,
Any news here?
-žarko
Any news here?
-žarko
-
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Order of e.document.* events (strange case with an XFA)
Hi zarko.
Seems the showing special modal dialogue "Open Site Warning..." when your document is opening - it causes sending the "e.document.activated" too early:
e_document_initialized
>>
1. *e_document_activated*
2. show modal "Open Site Warning..." dialog
3. wait for close dialog by user
<<
e_pagesView_ready
e_documentView_ready
We will try to fix this issue in the new upcoming build.
Cheers.
Seems the showing special modal dialogue "Open Site Warning..." when your document is opening - it causes sending the "e.document.activated" too early:
e_document_initialized
>>
1. *e_document_activated*
2. show modal "Open Site Warning..." dialog
3. wait for close dialog by user
<<
e_pagesView_ready
e_documentView_ready
We will try to fix this issue in the new upcoming build.
Cheers.
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: Order of e.document.* events (strange case with an XFA)
Hi Vasyl,
Thanks for confirming
-ž
Thanks for confirming
-ž
-
- Site Admin
- Posts: 17949
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Order of e.document.* events (strange case with an XFA)
Hi support,
Seems that in 9.1.356 this issue is still present (so, not fixed), yes?
-žarko
Vasyl-Tracker Dev Team wrote: ↑Wed Jun 09, 2021 1:54 am Seems the showing special modal dialogue "Open Site Warning..." when your document is opening - it causes sending the "e.document.activated" too early:
...
We will try to fix this issue in the new upcoming build.
Seems that in 9.1.356 this issue is still present (so, not fixed), yes?
-žarko
-
- Site Admin
- Posts: 1797
- Joined: Mon Jan 15, 2018 9:01 am
Re: Order of e.document.* events (strange case with an XFA)
Hi,
This issue was reported fixed so it should be gone by now.
Could you please test version 9.2.358.0?
Regards.
This issue was reported fixed so it should be gone by now.
Could you please test version 9.2.358.0?
Regards.