Alt + key not responding for ok,cancel R.267

This forum is for eXpress++ general support.
Message
Author
k-insis
Posts: 96
Joined: Fri Jan 28, 2011 4:07 am

Alt + key not responding for ok,cancel R.267

#1 Post by k-insis »

Greetings.

So we noticed from end users reporting that Alt+key on for [Ok] button on bottom of form that are added by
"dcread gui addbuttons" is not responding anymore.

That goes for my own apps and for demos that are shipped with xdemo.exe (Group 1, sample 2 "Text based") and

In version 2.0 build 267 it is not working , even in xdemo.exe anymore.

While some older (tried 259) same Alt+key (like Alt-O for "OK") is working in applications and in xdemo.exe as expected, including translations to other languages.

How to test: Run xdemo.exe , Go to second Group of tests, run "Text based" and try hotkey Alt-O for [OK] .

Environment: Windows 10 R-1909, virtualised, xpp 1.9 and xpp 2.0, non-admin user account ; reports on same from older OS too.

I noticed in Readme.txt this one:

1422. Fixed a longtime bug in DCPUSHBUTTON and DCPUSHBUTTONXP. An ampersand
(&) in the caption of the button sets a hot-key shortcut. That
shortcut was active even in subsequent windows that are called by the
calling window. This fix insures that the shortcut only works on the
window where the shortcut was defined.


Am I missing something else in readme.txt ?

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Alt + key not responding for ok,cancel R.267

#2 Post by rdonnay »

I can confirm that this problem appears to have started with build 265.
It works ok in build 264.

This is surprising that it has never been reported since the release of 265 about 3 years ago.

I am working on a solution for you.
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Alt + key not responding for ok,cancel R.267

#3 Post by rdonnay »

This is very confusing to me.

If I use the build 264 DCLIPX.DLL created on 4/18/2016 then everything works ok.
If, however, I rebuild the build 264 DCLIPX.DLL from the same source that was used back in 2016, it no longer works.

I seem to have isolated this problem to Windows 10 because build 264 was the last version that I build on Windows 7.
This is true for both Xbase++ 1.9 and 2.0, therefore I believe that it is related to the Windows 10 C libraries.

It only happens on pushbuttons which use the & or Tilde character to define the hotkey because they are processed by Xbase++ via the SetAppEvent() function. Pushbuttons which use the ACCELKEY clause are processed in the eXpress++ event loop so they work just fine.

This is going to be difficult to make a workaround because of language translations.
I need some time to think about this.

Which Windows version and Xbase++ version are you using?
The eXpress train is coming - and it has more cars.

k-insis
Posts: 96
Joined: Fri Jan 28, 2011 4:07 am

Re: Alt + key not responding for ok,cancel R.267

#4 Post by k-insis »

This seems to appear on probably all OS:

tried on
xpp 1.9 + Windows 10 Pro 64bit R1909 - 18363.592 (VM) and fully patched with updates
xpp 2.0 + Windows 10 Pro 64bit R1909 - 18363.592 (VM) and fully patched with updates
xpp 1.9x and a ancient Windows 7 32bit SP1 + xpp 1.9 (VM)

Userbase runs a variety of machines with various OS, reports come from various users that try those keyboard shortcuts.

k-insis
Posts: 96
Joined: Fri Jan 28, 2011 4:07 am

Re: Alt + key not responding for ok,cancel R.267

#5 Post by k-insis »

Edit: This is happening with default "English" language too with DCREAD GUI ADDBUTTONS (as it does with translations too).

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Alt + key not responding for ok,cancel R.267

#6 Post by rdonnay »

This is happening with default "English" language too with DCREAD GUI ADDBUTTONS (as it does with translations too).
You didn't understand what I meant by translations.

The hotkey may be different for each language.
This is why SetAppEvent() is used.

If I replace the code with a hard-coded hotkey, then it will only work for Alt-O, regardless of the language.
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Alt + key not responding for ok,cancel R.267

#7 Post by rdonnay »

This fixes the problem by using the hotkey system that is built into the event handler rather than SetAppEvent().

Copy _DCGETBX.PRG to your \exp20\source\dclipx folder.
Rebuild DCLIPX.DLL by running BUILD20.BAT or BUILD19_SL1.BAT
Attachments
_dcgetbx.zip
(88.11 KiB) Downloaded 588 times
The eXpress train is coming - and it has more cars.

k-insis
Posts: 96
Joined: Fri Jan 28, 2011 4:07 am

Re: Alt + key not responding for ok,cancel R.267

#8 Post by k-insis »

Greetings and good morning.

Mr. Donnay did you actually test this on full build and in xdemo.exe ?

Because the referenced sample that shows symptom in xdemo (Sample group1, sample "TextBased" or "DataBrow") Bottom Two butons [Ok] [Cancel] the alt+hotkey ( "O" in OK) is still non responsive.
ergo - feature of ALT + key is still not working with "ADDBUTTONS"

Also rebuild batches reference some nonexistent directories \expd20,\sqlquery* for testing and build aborts rather quickly. With some editing it goes through and reproduces fresh dll,def,lib and exe.

Just did full recompile of tools on windows 10 (xpp2) and on windows 7 (xpp1.9sl1) with same resoults, checked for .dll, .lib for proper date and they are freshly rebuilt, samo for xdemo.exe

Also I checked that .prg is replaced in appropriate directory.

md5 checksum: e8f05cd63083178966d4f008d9dd504d for_dcgetbx.prg

Can you confirm or deny that this patch works in full rebuild of Express 267 ?

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Alt + key not responding for ok,cancel R.267

#9 Post by rdonnay »

Mr. Donnay did you actually test this on full build and in xdemo.exe ?
I tested it using this sample program:

Code: Select all

#INCLUDE "dcdialog.CH"
#INCLUDE "appevent.CH"

FUNCTION Main()

LOCAL GetList[0], cTest := Space(20), lStatus

SetCancel(.f.)

@ 0,0 DCSAY 'Test'

@ 2,0 DCPUSHBUTTON CAPTION 'Button' SIZE 10,1 ;
   ACTION {||Msgbox('Button')} ACCELKEY xbeK_ALT_B

DCREAD GUI FIT ADDBUTTONS TO lStatus

wtf lStatus pause

RETURN nil

* -----------

PROC appsys ; RETURN
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Alt + key not responding for ok,cancel R.267

#10 Post by rdonnay »

I can affirm that it is not working with Xdemo.

Here is another fix
Attachments
_dcgetbx.zip
(88.1 KiB) Downloaded 587 times
The eXpress train is coming - and it has more cars.

Post Reply