FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour error on btnbmp with fwh 21.04
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
error on btnbmp with fwh 21.04
Posted: Thu Jun 03, 2021 07:07 PM
Code (fw): Select all Collapse
 @ oBrw:nBottom+2, oBrw:nWidth-20 BTNBMP aBtnBrow[4] ;
                        FLAT  SIZE 30, 30  OF oDlg   PIXEL ;
                        COLOR  nRgb(238,236,219),nRgb(238,236,219) ;
                        BITMAP ".\bitmaps\impostazioni.bmp" NOROUND;
                        ACTION ::ShowPopUp( { |oBtn| MenuContextual(oBtn,oBrw,cPrefixState+"Aux",oDbf)  } )


the error
Code (fw): Select all Collapse
Compiler version: Harbour 3.2.0dev (r1904111533)
   FiveWin  version: FWH 21.04
   C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
   Windows version: 6.1, Build 7601 Service Pack 1

   Time from start: 0 hours 0 mins 45 secs 
   Error occurred at: 06/03/21, 13:55:54
   Error description: Error BASE/1004  No exported method: END
   Args:
     [   1] = U   

Stack Calls
===========
   Called from:  => END( 0 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:SHOWPOPUP( 2091 )
   Called from: James.prg => (b)TESTTDATABASE( 154 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 713 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 999 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1817 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2051 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3560 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
   Called from: James.prg => TESTTDATABASE( 202 )



it seems to be an old error already fixed or an old version of tbtnbmp has been linked
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: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: error on btnbmp with fwh 21.04
Posted: Fri Jun 04, 2021 05:53 AM

ACTION ::ShowPopUp(...) is working here.
Please make sure the codeblock returns PopupMenu object

Regards



G. N. Rao.

Hyderabad, India
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: error on btnbmp with fwh 21.04
Posted: Fri Jun 04, 2021 01:32 PM

Thank you Silvio,

This is what I was looking for BtnBmp class.

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: error on btnbmp with fwh 21.04
Posted: Sun Jun 06, 2021 10:42 AM
Silvio, for ACTIONS in BUTTONS, try with

Code (fw): Select all Collapse
local oThis    := Self

@ oBrw:nBottom+2, oBrw:nWidth-20 BTNBMP aBtnBrow[4] ;
                        FLAT  SIZE 30, 30  OF oDlg   PIXEL ;
                        COLOR  nRgb(238,236,219),nRgb(238,236,219) ;
                        BITMAP ".\bitmaps\impostazioni.bmp" NOROUND;
                        ACTION oThis:ShowPopUp( { |oBtn| MenuContextual(oBtn,oBrw,cPrefixState+"Aux",oDbf)  } )
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: error on btnbmp with fwh 21.04
Posted: Sun Jun 06, 2021 11:00 AM
cnavarro wrote:Silvio, for ACTIONS in BUTTONS, try with

Code (fw): Select all Collapse
local oThis    := Self

@ oBrw:nBottom+2, oBrw:nWidth-20 BTNBMP aBtnBrow[4] ;
                        FLAT  SIZE 30, 30  OF oDlg   PIXEL ;
                        COLOR  nRgb(238,236,219),nRgb(238,236,219) ;
                        BITMAP ".\bitmaps\impostazioni.bmp" NOROUND;
                        ACTION oThis:ShowPopUp( { |oBtn| MenuContextual(oBtn,oBrw,cPrefixState+"Aux",oDbf)  } )

Sorry please. Not correct.

In the clause "ACTION ::ShowPopup", Self is the button object. not the local Self
Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: error on btnbmp with fwh 21.04
Posted: Sun Jun 06, 2021 01:32 PM

sometimes is go out the error , I'am trying many times
the function return omenu obj

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: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: error on btnbmp with fwh 21.04
Posted: Sun Jun 06, 2021 01:33 PM
nageswaragunupudi wrote:
cnavarro wrote:Silvio, for ACTIONS in BUTTONS, try with

Code (fw): Select all Collapse
local oThis    := Self

@ oBrw:nBottom+2, oBrw:nWidth-20 BTNBMP aBtnBrow[4] ;
                        FLAT  SIZE 30, 30  OF oDlg   PIXEL ;
                        COLOR  nRgb(238,236,219),nRgb(238,236,219) ;
                        BITMAP ".\bitmaps\impostazioni.bmp" NOROUND;
                        ACTION oThis:ShowPopUp( { |oBtn| MenuContextual(oBtn,oBrw,cPrefixState+"Aux",oDbf)  } )

Sorry please. Not correct.

In the clause "ACTION ::ShowPopup", Self is the button object. not the local Self


Excuse me, that goes without saying
What I mean is that if the method you are calling is from the user class you are using, in the call in the ACTION of the buttons, it must expressly refer to the SELF of your class, because if not the ACTION understands which is a method of the class TBUTTON, TBTNBMP, etc.
In this case, if the method, you are calling ( ::ShowPopUp ) belongs to its class and not to TBTNBMP, my assessment is correct.
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: error on btnbmp with fwh 21.04
Posted: Sun Jun 06, 2021 06:24 PM

He is calling BtnBmp's ShowPopup method only. It should work if using unmodified libraries and the codeblock returns a popup menu object.

Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: error on btnbmp with fwh 21.04
Posted: Sun Jun 06, 2021 08:27 PM
Nages, Cristobal, this is very strange !!!!

I am trying to intercept the error again but it does not always come out and then this evening
a strange very strange thing happened because I called a function which is on line 128
and instead made a mistake in another function which is on line 154

I'll explain with more details

the error
Code (fw): Select all Collapse
 Compiler version: Harbour 3.2.0dev (r1904111533)
   FiveWin  version: FWH 21.04
   C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
   Windows version: 6.1, Build 7601 Service Pack 1

   Time from start: 0 hours 1 mins 18 secs 
   Error occurred at: 06/06/21, 19:17:33
   Error description: Error BASE/1004  No exported method: END
   Args:
     [   1] = U   

Stack Calls
===========
   Called from:  => END( 0 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:SHOWPOPUP( 2091 )
   Called from: James.prg => (b)TESTTDATABASE( 154 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 713 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 999 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1817 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2051 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3560 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
   Called from: James.prg => TESTTDATABASE( 202 )







I explain you

I have on line 128 of my procedure this line

oBrw:bRClicked := {|nRow,nCol| CLDisp_Men(nRow,nCol,oBrw,cPrefixState+"Aux",oDbf,oDlg)}

CLDisp_Men function open a menu

Code (fw): Select all Collapse
Function  CLDisp_Men(nRow,nCol,oBrw,cIniEntry,oDbf,oDlg)
           local oMenu

      MENU oMenu POPUP
        MENUITEM "Esporta" ACTION ExportToExcel( oBrw )
         SEPARATOR
        MENUITEM "Colonne" ACTION Ut_BrwColConfig( oBrw, cIniEntry )
           SEPARATOR
           MENUITEM "al primo record  " +space(6)+ CHR(VK_TAB) + "Ctrl+Home";
              MESSAGE "Mostra la lista dal primo record";
              RESOURCE "GRID_TOP";
              ACTION oBrw:KeyDown(VK_HOME, 0)  WHEN (oDbf:KeyCount()) > 0
 .......
 ENDMENU
         ACTIVATE POPUP oMenu OF oDlg AT  oBrw:nTop+nRow, oBrw:nLeft+nCol
         return NIL


and this evening I 'm using this menu when is go out the error

But the error is go out to another line 154 where I have this

@ oBrw:nBottom+2, oBrw:nWidth-20 BTNBMP aBtnBrow[4] ;
FLAT SIZE 30, 30 OF oDlg PIXEL ;
COLOR nRgb(238,236,219),nRgb(238,236,219) ;
BITMAP ".\bitmaps\impostazioni.bmp" NOROUND;
ACTION ::ShowPopUp( { |oBtn| MenuContextual(oBtn,oBrw,cPrefixState+"Aux",oDbf) } )


MenuContextual(oBtn,oBrw,cPrefixState+"Aux",oDbf) is a copy of CLDisp_Men function but return oMenu object


Code (fw): Select all Collapse
Function MenuContextual(oControl,oBrw,cIniEntry,oDbf)
           local oMenu

    MENU oMenu POPUP
        MENUITEM "Esporta" ACTION ExportToExcel( oBrw )
         SEPARATOR
        MENUITEM "Colonne" ACTION Ut_BrwColConfig( oBrw, cIniEntry )
           SEPARATOR
           MENUITEM "al primo record  " +space(6)+ CHR(VK_TAB) + "Ctrl+Home";
              MESSAGE "Mostra la lista dal primo record";
              RESOURCE "GRID_TOP";
              ACTION oBrw:KeyDown(VK_HOME, 0)  WHEN (oDbf:KeyCount()) > 0
.....
  ENDMENU

         return oMenu
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

Continue the discussion