[v362] Trying to remove 'In All Docs from this Window' from IPXV_SearchView - unexpected results  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

[v362] Trying to remove 'In All Docs from this Window' from IPXV_SearchView - unexpected results

Post by zarkogajic »

Hi Support,

This topic is an extension of the following one: https://forum.pdf-xchange.com/viewtopic.php?t=39139

This will be a longer topic - as the problem I'm facing now is rather complex - so I'll try to explain what I'm doing ...

Preface: I have multiple instances of IPXV_Control in my application and I want all MainFrames to work "stanadlone".
Way before IsolatedMainFrames was added I had to inject my code into the search operations of the IPXV_SearchView. I made it so that "In All Open Documents" would search only in documents in the MainFrame where search was initiated. For this purpose I had to "inject" into op.search via e.operBeforeExecute - where I would change what's inside Operation.Params.Root.Input - so the search only happens for documents in "active" MainFrame. This all works as expected.

Issue: The newly added "In All Docs from this Window" option therefore for me makes no sense (as it does what I already do) - so I decided to simply remove it from the "where would you like to search" combo drop down / list. The removing part includes getting my hands on that "cb.where" IUIX_Combo and locating that new item using "FindItemByParam(-3)" and then combo.RemoveItem. I do that when setting up control - so way before any documents are loaded or similar.

This works (i.e. option to search only in this window/frame) is gone:
image.png
image.png (7.57 KiB) Viewed 1015 times

But then problems start to happen: selecting a folder using "Browser for folder" would result in:

image(1).png
image(1).png (11.43 KiB) Viewed 1015 times

Note the extra separator line - it should not be there. It should be between "clear folder list" and "browse for folder".
I guess you are counting entries and you expect to have 3 "fixed" entries before the first separator.

If I then "Clear Folder List" - that separator line is gone - BUT "Clear folder list" is still here - and should not be.

image.png
image.png (9.3 KiB) Viewed 1015 times

BUT, if I then again do "Browse for folder" and select a folder, the result would be:

image.png
image.png (8.68 KiB) Viewed 1015 times

Note the two "Clear folder list" entries added (both do clear when clicked). Again, as if you are expecting to have a fixed number of entries and (since one is missing) adding "clear folder list" even though it is already there...

Question / request in short (so it is not that complex actually): could you change your inner logic - to allow / take into account not having a fixed number (3) of entries on top?

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

Re: [v362] Trying to remove 'In All Docs from this Window' from IPXV_SearchView - unexpected results

Post by zarkogajic »

Hi Support,

For the moment I can do the following "hack" - but am not too happy with it as changing the style (to being a separator) of the "In all open documents " item is weird :)

image.png
image.png (11.18 KiB) Viewed 1010 times



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

Re: [v362] Trying to remove 'In All Docs from this Window' from IPXV_SearchView - unexpected results

Post by Vasyl-Tracker Dev Team »

In future builds we will solve that issues with this combo, especially in the case when IsolatedMainFrames==true is.
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.
Post Reply