op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
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
op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Hi Support,
Is there any callback mechanism I could use to be notified when a document added to the op.combineDoc's Input array fails to be processed/combined for whatever the reason: unsupported file format, file does not exist, operation not permitted, ... ?
For what I know, at the moment, if an entry fails during operation execution - no simple way to know this from the resulting IPXC_Document.
Upon any of the above mentioned problem-cases: the "Cannot add file" dialog appears and the user can Ignore or Abort - I'd like to be able to react on "Ignore" / "Ignore all" via some callback thingy...
It would be even better if I could programmatically specify the action for the above dialog - so before it appears to, for example, pre-set "Ignore" somehow (and still have the callback notify me of the no-go case and let me know of the input parameter and what the problem is, like "operation not permitted").
I think this part calls for a new option (aka feature request) in the op.combineDoc's IOpInputItem, something like "WhenCannotAdd=show_dialog/ignore/ignore all/abort"
p.s.
Yes, I know: asking and asking for more ...
-žarko
Is there any callback mechanism I could use to be notified when a document added to the op.combineDoc's Input array fails to be processed/combined for whatever the reason: unsupported file format, file does not exist, operation not permitted, ... ?
For what I know, at the moment, if an entry fails during operation execution - no simple way to know this from the resulting IPXC_Document.
Upon any of the above mentioned problem-cases: the "Cannot add file" dialog appears and the user can Ignore or Abort - I'd like to be able to react on "Ignore" / "Ignore all" via some callback thingy...
It would be even better if I could programmatically specify the action for the above dialog - so before it appears to, for example, pre-set "Ignore" somehow (and still have the callback notify me of the no-go case and let me know of the input parameter and what the problem is, like "operation not permitted").
I think this part calls for a new option (aka feature request) in the op.combineDoc's IOpInputItem, something like "WhenCannotAdd=show_dialog/ignore/ignore all/abort"
p.s.
Yes, I know: asking and asking for more ...
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Hello zarkogajic,
If the operation is called with the OpExecFlag_NoUI flag the behavior would be just like you wanted. There is a drawback though - the progress won't be shown.
Cheers,
Alex
If the operation is called with the OpExecFlag_NoUI flag the behavior would be just like you wanted. There is a drawback though - the progress won't be shown.
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: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Hi Alex,
Thanks, but that does not answer my question even remotely close
-ž
Thanks, but that does not answer my question even remotely close
-ž
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Hi Alex,
I know what I ask here (callback) is too much given the future...
Could you at least consider adding something like "ErrDetails" (string or HResult) to the IOpInputItem that you will fill with the reason why a document failed to be combined (does not exists, operation not permitted, op aborted, something else, ...) - similar to the ErrrDetails of the OpenDocParams ICab - but for op.combineDocs.
This way, once the operation is done, it will be possible to know what documents and why are not included in the resulting Core Document.
-žarko
I know what I ask here (callback) is too much given the future...
Could you at least consider adding something like "ErrDetails" (string or HResult) to the IOpInputItem that you will fill with the reason why a document failed to be combined (does not exists, operation not permitted, op aborted, something else, ...) - similar to the ErrrDetails of the OpenDocParams ICab - but for op.combineDocs.
This way, once the operation is done, it will be possible to know what documents and why are not included in the resulting Core Document.
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Hello zarkogajic,
Done, now the ErrDetails CAB node will be added to each of the IOpInputItem as an out parameter and will store the HRESULT of each operation.
Cheers,
Alex
Done, now the ErrDetails CAB node will be added to each of the IOpInputItem as an out parameter and will store the HRESULT of each operation.
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: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Hi Alex,
Fantastic, thanks!
-žarko
Fantastic, thanks!
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
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: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Hi Alex,
Given the new ErrDetails cab entry .... I'm feeling lucky, and must ask for more
Could you also add an entry to IOpInputItem (or as a new entry in the Options dictionary for op.combineDocs) -> default action for "Cannot Add File": Ignore / Ignore All / Abort.
I know I could use OpExecFlag_NoUI for "Ignore All" -> but, as you said, this will also not show the progress dialog. I love the progress dialog and would still like to have it.
Why: I do not want questions to be raised during the work - just add documents you can and fail those you cannot - as, when the operation is finished I will be able to read the ErrDetails for each IOpInputItem and present the results to the user (if some documents failed to be added).
p.s.
Admitting: not a must have, more like nice to have.
-žarko
Given the new ErrDetails cab entry .... I'm feeling lucky, and must ask for more
Could you also add an entry to IOpInputItem (or as a new entry in the Options dictionary for op.combineDocs) -> default action for "Cannot Add File": Ignore / Ignore All / Abort.
I know I could use OpExecFlag_NoUI for "Ignore All" -> but, as you said, this will also not show the progress dialog. I love the progress dialog and would still like to have it.
Why: I do not want questions to be raised during the work - just add documents you can and fail those you cannot - as, when the operation is finished I will be able to read the ErrDetails for each IOpInputItem and present the results to the user (if some documents failed to be added).
p.s.
Admitting: not a must have, more like nice to have.
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Hello zarkogajic,
Done, now this will be available from the next release 354:
Cheers,
Alex
Done, now this will be available from the next release 354:
Code: Select all
{ L"DefaultErrAction", dt_Int, 0, 0 }, //0 - None, 1 - Ignore, 2 - Abort
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: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Ah .. now I have to wait for 354
-ž
-ž
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Hello zarkogajic,
Though our testers asked me whether this should be an Input Item node or an Options node?
Cheers,
Alex
Though our testers asked me whether this should be an Input Item node or an Options node?
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: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Hi Alex,
To make it as configurable as possible I would have this as a part of the IOpInputItem.
The possible values would be: Dialog (instead of "None"), Ignore, Abort.
When an error happens for a file in the Input item, if:
Dialog: display the dialog to let user decide if it should be treated as Ignore / Ignore All or Abort
Ignore: (silently) ignore the error for this file
Abort: (silently) abort the operation
-žarko
To make it as configurable as possible I would have this as a part of the IOpInputItem.
The possible values would be: Dialog (instead of "None"), Ignore, Abort.
When an error happens for a file in the Input item, if:
Dialog: display the dialog to let user decide if it should be treated as Ignore / Ignore All or Abort
Ignore: (silently) ignore the error for this file
Abort: (silently) abort the operation
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Hello zarkogajic,
Yeah, the None option will leave the default behavior.
Cheers,
Alex
Yeah, the None option will leave the default behavior.
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: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Alex, is this already a part of 353?Sasha - Tracker Dev Team wrote: ↑Mon Mar 22, 2021 8:10 am Done, now the ErrDetails CAB node will be added to each of the IOpInputItem as an out parameter and will store the HRESULT of each operation.
if so, I cannot find it under: IOpInputItem.Params.Root["Output"]["ErrDetails"]
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Hello zarkogajic,
It's not under the Output.ErrDetails - it's been added to the Input items dictionaries - so you can obtain that there.
Cheers,
Alex
It's not under the Output.ErrDetails - it's been added to the Input items dictionaries - so you can obtain that there.
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: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Hi Alex,
Thanks found it.
However, for all "ignored" (therefore those that have displayed the default Ignore/IgnoreAll/Abort dialog) - ErrDetails is "0" (after IOperation execution of course).
For example, the first item to be combined does not allow extraction of pages, so the dialog comes up and I select Ignore. Once the operation is completed (remaining files are ok) I would expect the ErrDetail HResult for that item to be non zero.
-žarko
Thanks found it.
However, for all "ignored" (therefore those that have displayed the default Ignore/IgnoreAll/Abort dialog) - ErrDetails is "0" (after IOperation execution of course).
For example, the first item to be combined does not allow extraction of pages, so the dialog comes up and I select Ignore. Once the operation is completed (remaining files are ok) I would expect the ErrDetail HResult for that item to be non zero.
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Hello zarkogajic,
Will look into that.
Cheers,
Alex
Will look into that.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Hello zarkogajic,
OK, so the place where that value was filled was not the place for all of the error handling. Moved that code piece and now it will always be filled on bad HRESULT. The fix itself will be available from the 354 build.
Cheers,
Alex
OK, so the place where that value was filled was not the place for all of the error handling. Moved that code piece and now it will always be filled on bad HRESULT. The fix itself will be available from the 354 build.
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: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Alex,
Ok, thanks .. so waiting for 354
-ž
Ok, thanks .. so waiting for 354
-ž
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Hello zarkogajic,
The DefaultErrAction will be after the 354 - 355 presumed. As a 354 is a small fix build.
Cheers,
Alex
The DefaultErrAction will be after the 354 - 355 presumed. As a 354 is a small fix build.
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: op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Hi Alex,
-žarko
Working as expected in 354.Sasha - Tracker Dev Team wrote: ↑Thu Apr 22, 2021 1:51 pm OK, so the place where that value was filled was not the place for all of the error handling. Moved that code piece and now it will always be filled on bad HRESULT. The fix itself will be available from the 354 build.
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
op.combineDocs -> callback when documents being combined + default action for "Cannot Add File"
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ