error on btnbmp with fwh 21.04

error on btnbmp with fwh 21.04

Postby Silvio.Falconi » Thu Jun 03, 2021 7:07 pm

Code: Select all  Expand view  RUN
@ 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: Select all  Expand view  RUN
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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7068
Joined: Thu Oct 18, 2012 7:17 pm

Re: error on btnbmp with fwh 21.04

Postby nageswaragunupudi » Fri Jun 04, 2021 5:53 am

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: error on btnbmp with fwh 21.04

Postby Horizon » Fri Jun 04, 2021 1:32 pm

Thank you Silvio,

This is what I was looking for BtnBmp class.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: error on btnbmp with fwh 21.04

Postby cnavarro » Sun Jun 06, 2021 10:42 am

Silvio, for ACTIONS in BUTTONS, try with

Code: Select all  Expand view  RUN

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
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: error on btnbmp with fwh 21.04

Postby nageswaragunupudi » Sun Jun 06, 2021 11:00 am

cnavarro wrote:Silvio, for ACTIONS in BUTTONS, try with

Code: Select all  Expand view  RUN

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
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: error on btnbmp with fwh 21.04

Postby Silvio.Falconi » Sun Jun 06, 2021 1: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7068
Joined: Thu Oct 18, 2012 7:17 pm

Re: error on btnbmp with fwh 21.04

Postby cnavarro » Sun Jun 06, 2021 1:33 pm

nageswaragunupudi wrote:
cnavarro wrote:Silvio, for ACTIONS in BUTTONS, try with

Code: Select all  Expand view  RUN

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
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: error on btnbmp with fwh 21.04

Postby nageswaragunupudi » Sun Jun 06, 2021 6: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
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: error on btnbmp with fwh 21.04

Postby Silvio.Falconi » Sun Jun 06, 2021 8: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: Select all  Expand view  RUN
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: Select all  Expand view  RUN


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: Select all  Expand view  RUN
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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7068
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Silvio.Falconi and 54 guests