error on btnbmp with fwh 21.04

Post Reply
User avatar
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

error on btnbmp with fwh 21.04

Post by Silvio.Falconi »

Code: Select all | Expand

@ 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

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
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: error on btnbmp with fwh 21.04

Post by nageswaragunupudi »

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

G. N. Rao.
Hyderabad, India
Horizon
Posts: 1323
Joined: Fri May 23, 2008 1:33 pm
Has thanked: 4 times

Re: error on btnbmp with fwh 21.04

Post by Horizon »

Thank you Silvio,

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

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: error on btnbmp with fwh 21.04

Post by cnavarro »

Silvio, for ACTIONS in BUTTONS, try with

Code: Select all | Expand


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
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: error on btnbmp with fwh 21.04

Post by nageswaragunupudi »

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

Code: Select all | Expand


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
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: error on btnbmp with fwh 21.04

Post by Silvio.Falconi »

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
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: error on btnbmp with fwh 21.04

Post by cnavarro »

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

Code: Select all | Expand


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
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: error on btnbmp with fwh 21.04

Post by nageswaragunupudi »

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
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: error on btnbmp with fwh 21.04

Post by Silvio.Falconi »

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

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



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

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
Post Reply