Silverfrost Forums

Welcome to our forums

Question regarding %bb

2 Aug 2013 4:55 #12732

Paul,

I have a program which uses %bb. Lines 8 to 13 inclusive in the following are listed exactly as in the program: the rest is dressing to show the effect.

      WINAPP
      OPTIONS (INTL)
      PROGRAM TEST_BB
      COMMON iSTNBUTTON
      INTEGER, EXTERNAL :: GREY_FN, Move_To_Data_FN
      iSTNBUTTON = 1
      IA = WINIO@('%ca[Test]&')
      IA = WINIO@ ('%fn[Segoe UI]%ts&', 0.96D0)
      IA = WINIO@('%16~bb[Notebook/Observations]&',
     &            iSTNBUTTON)
      IA=WINIO@('%rj&')
      IA=WINIO@('%12~`^bb[ACCEPT1/Accept all] &', iSTNBUTTON, 
     &                                                  Move_To_Data_FN)
      IA=WINIO@('%^bt[Grey out]', GREY_FN)
      STOP; END
      INTEGER FUNCTION Move_To_Data_FN()
      Move_To_Data_FN = 1
      RETURN; END
      INTEGER FUNCTION GREY_FN()
      COMMON iSTNBUTTON
      iSTNBUTTON = 0
      GREY_FN = 1
      RETURN; END
      RESOURCES
      1 24 default.manifest
      Notebook         ICON    'Notebook2.ico'
      ACCEPT1          ICON    'YES1.ICO'

In this small demo, pressing the 'Grey out' %bt has the desired effect, i.e. greying out the two %bb buttons. However in my too-big-to-post-here program (TBTPH Program), the 'Accept all' %bb certainly greys out when iSTNBUTTON is set to 0, but it also loses its contents of icon and text, whereas the 'Observations' %bb simply greys out.

Something else is going on in my TBTPH Program, but I am at a loss to know what to look for. Can you help me by suggesting circumstances where Clearwin+ might remove the icon and text from a %bb button please?

(I was hoping that the small code would show it, but it does not - the worst kind of error to find!)

Eddie

2 Aug 2013 6:42 #12734
  1. Are you using the latest beta download of salflibc.dll?

  2. Maybe something (an integer variable or literal character string) is being over-written or is not 'static'). I have had a quick look at your sample and can not see any problems.

3 Aug 2013 5:47 #12743

I think that I know what the problem might be here. I have fixed ClearWin+ accordingly and uploaded a new beta.

3 Aug 2013 12:57 #12744

Hi Paul,

Many thanks. My feeling was that it was a coding error on my part, especially as I couldn't reproduce it in a mini program.

Regards

Eddie

Please login to reply.