Silverfrost Forums

Welcome to our forums

Exception with accelerator key %ac

1 Feb 2009 6:07 #4263

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

      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
      
1 Feb 2009 6:29 #4264

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

1 Feb 2009 9:20 #4265

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

1 Feb 2009 9:57 #4266

Thank you for your repsonse!

But it doesn't work either with

      i=winio@ ('%es&')

nor (the alternative as explained in the help file) with

      i=winio@ ('%ac[ESC]&','EXIT')

All other hot keys are working without any problem. Only the ESC key generates this problem.

WoSl

1 Feb 2009 10:44 #4267

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

22 Feb 2009 3:48 #4323

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

Please login to reply.