FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour W3 compilation error
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
W3 compilation error
Posted: Mon May 26, 2025 07:52 AM
can you kindly see this test because it makes an error I don't understand
Progetto: test2, Ambiente: bcc7Harbor:
[1]:Harbour.Exe test2.prg  /m /n0 /gc1 /w3 /es2 /a /iC:\Work\fwh\include /iC:\Work\harbour\Include /jC:\Work\errori\BTNBMP~1\I18n\Main.hil /iinclude;c:\work\fwh\include;C:\Work\harbour\include /oObj\test2.c
Harbour 3.2.0dev (r2403071241)
Copyright (c) 1999-2021, https://harbour.github.io/
Compiling 'test2.prg'...
test2.prg(68) Warning W0032  Variable 'OBTNANNULLA' is assigned but not used in function 'TEST(41)'
test2.prg(68) Warning W0032  Variable 'OBTNAIUTO' is assigned but not used in function 'TEST(46)'
test2.prg(68) Warning W0032  Variable 'OBTNCONFERMA' is assigned but not used in function 'TEST(52)'

No code generated.

the test
#include "fivewin.ch"
#include 'constant.ch'

 #define DLG_nColorDlg     RGB(245,245,235)
 #define DLG_nColortitle1  RGB(219,230,244)
 #define DLG_nColortitle2  RGB(207,221,239)
 #define DLG_nColorBar1    RGB(250,250,245)
 #define DLG_nColorBar2    RGB(245,245,235)
 #define DLG_nColorBtn1    RGB(245,245,235)
 #define DLG_nColorBtn2    RGB(250,250,245)
 #define DLG_nColorBtnB    RGB(195,195,185)

Function test()
   local oDlg,oFont
   local oBarcat
   local oBtnAnnulla
   local oBtnConferma
   local oBtnAiuto
   local nBottom:= 39
   local nRight := 95
   local nWd  :=  Max( nRight * DLG_CHARPIX_W, 180 )
   local nHt  :=  nBottom * DLG_CHARPIX_H


    oFont := TFont():New( "TAHOMA", 0, 14,, )


 DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL TRUEPIXEL;
       FONT oFont  TiTle "test" COLOR CLR_BLACK, DLG_nColorDlg  ;
       STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
                  WS_MINIMIZEBOX)


        //-------------------------------------------------ButtonBar

      DEFINE BUTTONBAR oBarCat OF oDlg SIZE 80, 70  2015   BOTTOM NOBORDER

      DEFINE BUTTON oBtnAnnulla OF oBarCat  ;
      FILENAME "DLG_NO";
      PROMPT "Annulla" TOOLTIP "Esci" ;
      ACTION   ( oDlg:end( IDCANCEL ) )

      DEFINE BUTTON oBtnAiuto OF oBarCat  ;
      FILENAME "HLP_DLG";
      PROMPT "Aiuto" TOOLTIP "Aiuto" ;
      ACTION NIL   GROUP

      DEFINE BUTTON oBtnConferma OF oBarCat  BTNRIGHT  ;
      FILENAME "DLG_OK";
      PROMPT "Conferma" ;
      TOOLTIP "Conferma i dati" ;
      ACTION   ( oDlg:end( IDOK ) )

     oBarCat:bClrGrad := { | lPressed | If( ! lPressed,;
                 { { 1, DLG_nColorBar1, DLG_nColorBar1} },;
                 { { 1, DLG_nColorBar2, DLG_nColorBar2} } ) }
     //-----------------------------------------------------------------//



    Activate Dialog oDlg ;
            on init (   oDlg:resize(),;
                        ChangeButtons( oBarCat )  )
            Return nil



   function ChangeButtons( oBar )
       AEval( oBar:aControls, { | oCtrl | oCtrl:nTop += 4, oCtrl:nHeight -= 4 } )
       return .T.

it tells me that they are not used when instead they are used in the buttonbar
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: W3 compilation error
Posted: Mon May 26, 2025 07:55 AM

Dear Silvio,

Please generate the PPO file and lets see what it has

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: W3 compilation error
Posted: Mon May 26, 2025 08:17 AM

change it into

DEFINE BUTTON aBtnBar[1] OF oBarCat ; //oBtnAnnulla

  FILENAME "DLG_NO";

  PROMPT "Annulla" TOOLTIP "Esci" ;

  ACTION   ( oDlg:end( IDCANCEL ) )



  DEFINE BUTTON aBtnBar[2] OF oBarCat  ;     //oBtnAiuto

  FILENAME "HLP_DLG";

  PROMPT "Aiuto" TOOLTIP "Aiuto" ;

  ACTION NIL   GROUP



  DEFINE BUTTON aBtnBar[3]  OF oBarCat  BTNRIGHT  ;   //oBtnConferma

  FILENAME "DLG_OK";

  PROMPT "Conferma" ;

  TOOLTIP "Conferma i dati" ;

  ACTION   ( oDlg:end( IDOK ) )

w3 compiled without errors , so matriz yes variables no , why ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: W3 compilation error
Posted: Mon May 26, 2025 08:31 AM

Harbour detects that variables oBtnAnnulla, oBtnAiuto and oBtnConferma are assigned but they are not used

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion