forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Exception with accelerator key %ac

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
wosl



Joined: 31 Jan 2008
Posts: 30

PostPosted: Sun Feb 01, 2009 7:07 pm    Post subject: Exception with accelerator key %ac Reply with quote

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
View user's profile Send private message
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Sun Feb 01, 2009 7:29 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Sun Feb 01, 2009 10:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
wosl



Joined: 31 Jan 2008
Posts: 30

PostPosted: Sun Feb 01, 2009 10:57 pm    Post subject: Reply with quote

Thank you for your repsonse!

But it doesn't work either with

Code:

      i=winio@ ('%es&')


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
View user's profile Send private message
wosl



Joined: 31 Jan 2008
Posts: 30

PostPosted: Sun Feb 01, 2009 11:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
wosl



Joined: 31 Jan 2008
Posts: 30

PostPosted: Sun Feb 22, 2009 4:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group