Hide document from SearchView (search in folder) result select action  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: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Hide document from SearchView (search in folder) result select action

Post by zarkogajic »

Hi Support,

I've already asked a few questions about SearchView and a result's select action in the past: viewtopic.php?f=66&t=33398#p137977

I now know more about how this all internally works - and I'm hoping I can ask one specific question - and hopefully have some workable solution...

Problem in short:
1. SearchView with search in folder
2. Click the search result
3. "If the item is document then we'll try to obtain the document - either from the IPXV_Inst (that checks whether it's already opened) ..."

If having 2 MainFrames (2 pxvControl instances) and a document is already open in Frame1. Executing the folder search in Frame2 and selecting a result matching the document in Frame1 - your internal code will find it and highlight results in it. If Frame1 is not visible - it will appear as if nothing has happened.

I am desperate in trying to find a way to "hide" a document from your code checking if the document is already open. I need step 3 (above) to open a document in the Frame where the SearchView result action is initiated - and disregard a document already being open in some other Frame(s).

Is there any way (never mind how complex, crazy, do-not-do-it, that-should-not-be-done, this-is-top-secret, ...) to inject into/override when your internal code searches for the already open document (clicked in step 3) and say "no, it is not already open!"?

Experience tells me that some questions first get "cannot be done" answer, but, at a later time "ah, yes" happens and you guys come up with a solution :)

I've even tried specifying "Hidden" with CreateOpenDocParams - and the doc does not get displayed (no IPXV_DocumentView gets created) - BUT if I click a search result (matching that document) - your internal code unhides it! From my point of (very subjective) view, this is not how it should be working - if I've hidden a document- nothing must unhide it.

p.s.
More or less everything else, when working with multiple pxvControl instances, SearchView related I was able to solve. The struggle was real but it was worth it. Only this above, I simply cannot figure out how to solve.


-žarko
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2351
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Hide document from SearchView (search in folder) result select action

Post by Vasyl-Tracker Dev Team »

Hi žarko.
Is there any way (never mind how complex, crazy, do-not-do-it, that-should-not-be-done, this-is-top-secret, ...) to inject into/override when your internal code searches for the already open document (clicked in step 3) and say "no, it is not already open!"?
Sorry but currently is no way to do it from your side. In the future we may add one global and hidden option like "Each MainFrame has own list of documents, totally isolated from docs from other MainFrames'". With turning ON that option all existing problems related to existence of one common list of documents - will be solved in natural way.

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

Re: Hide document from SearchView (search in folder) result select action

Post by zarkogajic »

Hi Vasyl,

Thanks for the input. Please allow me to be in denial to accept the truth, yet :)

And please gimme one more chance:

I've figured your internal code cannot find the document if it was open via IStream.

I'm using this, at the moment, to ensure only one pxvControl / MainFrame can do folder search - as results clicking action will not find the document if already IStream open in another Frame. This means I have multiple MainFrames opening document via IStream (acting as read only Viewer) and only one MainFrame acting as Editor where I have enabled folder search. That's not the ideal approach as I would really like "Viewers" to be able to do folder search as well (as say isolated).

I thought (and have actually did it) I would hook into some of the methods, like ActualFileName of IPXC_DocSrcInfo and change the return value. Never mind the CoreDoc.SrcInfo (and its methods) is read-only, I can do it. This did not help - meaning you internal code is not relying on that method. I've then hooked the SrcInfo's File (IAFS_File) and FileName (IAFS_Name) to return nothing for the same named document - again no luck - your internal code does not rely on that either. I've also tried with various Inst.FindDocByXY - also didn't help (also meaning internally you are not using this).

So, one final question before I rest and wait for the "isolated" implementation: Is there any (among currently exposed ones, of course) method or (read-only) interface implementation I could hook into to change what's happening under the hood - and trick your code that the document is not open - as if the document is open via IStream?

Or in short: why your internal code does not find a document if open via IStream?

-žarko
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: Hide document from SearchView (search in folder) result select action

Post by zarkogajic »

Hi Support,
In the future we may add one global and hidden option like "Each MainFrame has own list of documents, totally isolated from docs from other MainFrames'". With turning ON that option all existing problems related to existence of one common list of documents - will be solved in natural way.
Is this maybe implemented or in "to do" list?

-žarko
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2351
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Hide document from SearchView (search in folder) result select action

Post by Vasyl-Tracker Dev Team »

Hi zarko.

Yes, it is in our TODO list, and can be added in 355 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.
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: Hide document from SearchView (search in folder) result select action  SOLVED

Post by zarkogajic »

Hi Vasyl,

That would be great!

p.s.
When implemented please notify here.

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

Hide document from SearchView (search in folder) result select action

Post by Sasha - Tracker Dev Team »

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