Command execution difference: click item vs enter key on item in Quick Launch list  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: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Command execution difference: click item vs enter key on item in Quick Launch list

Post by zarkogajic »

Hi Support,

Please shed some light on the following...

(some intro) I'm custom handing some commands, let's say "cmd.newDocHtml" for the sake of this question.

In my custom IUIX_CmdHandler implementation, for UIX_CmdNotify_Exec in OnNotify I'm calling the following 3 "code lines":

1. Register IUIX_EventMonitor
2. Call Original Handler -> this will bring up the "DlgNewDocFromWebPage" dialog.
3. Unregister IUIX_EventMonitor

My code does what's needed in IUIX_EventMonitor.OnEventMonitor for e.Visible for "DlgNewDocFromWebPage" (pTarget.ID).

The above all works as expected WHEN that command is executed via mouse click on the corresponding item in the "File-New Document-From Web Page" main menu.

Also, all works as expected if I initiate the command from the "Quick Launch" via mouse click:

image.png

However: if I hit the enter (/return) key on that item in the Quick Launch list, my IUIX_EventMonitor never gets the "DlgNewDocFromWebPage" for pTarget.ID. Actually my IUIX_EventMonitor.OnEventMonitor never gets called - as if it is not registered (but is!)

So, clicking vs enter-key works differently.

Why ?

p.s.
The above applies as described for other commands as well ...

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

Re: Command execution difference: click item vs enter key on item in Quick Launch list

Post by Vasyl-Tracker Dev Team »

We will check this case and let you know what is going on...
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.
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Command execution difference: click item vs enter key on item in Quick Launch list

Post by Vasyl-Tracker Dev Team »

We found the reason of the trouble. It occurs because OnNotify(Exec) is called inside from the internal EventMonitor installed by QuickLaunch control for itself. And in this specific context all new registered monitors will not get any event until runtime will exit from that context. We will fix that issue in the upcoming release. Or currently you may use the simple workaround - register your event monitor once and globally before any using the QuickLaunch control.
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: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Re: Command execution difference: click item vs enter key on item in Quick Launch list  SOLVED

Post by zarkogajic »

Hi Vasyl,

Thanks!

-žarko
Post Reply