View previous topic :: View next topic |
Author |
Message |
wosl
Joined: 31 Jan 2008 Posts: 30
|
Posted: Sun Feb 01, 2009 7:07 pm Post subject: Exception with accelerator key %ac |
|
|
The usage of the accelerator key %ac in combination with ESC key causes an exception 0x000006BA. This happens only in debug mode (sdbg), otherwise it works as expected. The idea is to exit an user input panel without any action (ExitPanelX=0) if the user is pressing the ESC key, similar pressing the "Cancel" button.
Have I missed something?
Regards
WoSl
Here is a code snippet
Code: |
external DefLayout,ExitPanelX
...
i=winio@ ('%ca[Assign Box Layout]&')
i=winio@ ('%2.1ob[no_border]&')
i=winio@ ('Box Layout Template%nl&')
i=winio@ ('%15.5ls&',cBoxDef,nlayout,mlayout)
i=winio@ ('%cb&')
i=winio@ ('%ta%^bt[&Modify'//char(10)//'Template]&',DefLayout)
i=winio@ ('%cb%7nl&')
i=winio@ ('%ac[ESC]&',ExitPanelX)
i=winio@ ('%cn%`bt[&OK]%ta%bt[&Cancel]')
....
integer function ExitPanelX()
ExitPanelX=0
return
end
|
|
|
Back to top |
|
|
IanLambley
Joined: 17 Dec 2006 Posts: 490 Location: Sunderland
|
Posted: Sun Feb 01, 2009 7:29 pm Post subject: |
|
|
Use the %es format code, with no callback.
Your method will work, but as well as the
external ExitPanelX
in the main program, you need
Integer ExitPanelX
Regards
Ian |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Sun Feb 01, 2009 10:20 pm Post subject: |
|
|
Ian,
Although in sensu stricto the INTEGER type of ExitPanelX does need to be declared as well as EXTERNAL in the calling routine, I've got loads of code where I didn't - because ClearWin was the first time I ever used EXTERNAL anyway, and I wasn't sure of the syntax - and it seems to work fine with or without.
Eddie |
|
Back to top |
|
|
wosl
Joined: 31 Jan 2008 Posts: 30
|
Posted: Sun Feb 01, 2009 10:57 pm Post subject: |
|
|
Thank you for your repsonse!
But it doesn't work either with
nor (the alternative as explained in the help file) with
Code: |
i=winio@ ('%ac[ESC]&','EXIT')
|
All other hot keys are working without any problem. Only the ESC key generates this problem.
WoSl |
|
Back to top |
|
|
wosl
Joined: 31 Jan 2008 Posts: 30
|
Posted: Sun Feb 01, 2009 11:44 pm Post subject: |
|
|
Sorry,
I need to correct my last statement ("All other hot keys are working without any problem. Only the ESC key generates this problem."). After some more tests it occurs with all defined accelerator keys. Exception is occuring when using sdbg for debugging.
WoSl |
|
Back to top |
|
|
wosl
Joined: 31 Jan 2008 Posts: 30
|
Posted: Sun Feb 22, 2009 4:48 pm Post subject: |
|
|
Just another test result on this topic:
Executing the same EXE file on different hardware and Windows OS the debugger sdbg doesn't crash with an exception when pressing a key.
I'm using sdbg with FTN95 version 5.21.
Laptop & Windows XP Prof: exception (pressing a key)
Desktop & Windows 2000: no problem
On both systems the FTN95 installation and the exe file are identical. Also, I made sure not to mix up different versions of Salflibc.dll. The issue has nothing to do with the %ac Clearwin feature (has been deleted from source code before testing).
Any suggestion?
WoSl |
|
Back to top |
|
|
|