Page 1 of 1

also the error end on tbtnbmp

PostPosted: Wed May 03, 2023 8:13 am
by Silvio.Falconi
I don't understand I tried at least ten times and now I don't get the error but this morning I got the error
is a simple btnbmp control that opens a popup menu

Image



@ oBrw:nBottom+2, oBrw:nWidth-20 BTNBMP aBtnBrow[3] ;
FLAT ....
ACTION ::ShowPopUp( { |oBtn| MenuContextual(oBtn,oBrw,oDbf,cIniUser,cSection,,,oDlg,aBtnBrow[4]) } )

Error code
Code: Select all  Expand view
Called from:  => END( 0 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:SHOWPOPUP( 2091 )
   Called from: source\Pcomuni.prg => (b)COMUNI( 227 )

Re: also the error end on tbtnbmp

PostPosted: Wed May 03, 2023 11:28 am
by karinha
PCOMUNI.PRG line 227?

Regards, saludos.

Re: also the error end on tbtnbmp

PostPosted: Wed May 03, 2023 11:38 am
by Silvio.Falconi
karinha wrote:PCOMUNI.PRG line 227?

Regards, saludos.



ACTION ::ShowPopUp( { |oBtn| MenuContextual(oBtn,oBrw,oDbf,cIniUser,cSection,,,oDlg,aBtnBrow[4]) } ) PCOMUNI.PRG line 227

Code: Select all  Expand view
 @ oBrw:nBottom+2, oBrw:nWidth-20 BTNBMP aBtnBrow[3] ;
                FLAT  SIZE 30, 28  OF oDlg   PIXEL ;
                COLOR  nRgb(238,236,219),nRgb(238,236,219) ;
                BITMAP "TOO_TBL" NOROUND  ;
                ACTION ::ShowPopUp( { |oBtn| MenuContextual(oBtn,oBrw,oDbf,cIniUser,cSection,,,oDlg,aBtnBrow[4])  } )
 

Re: also the error end on tbtnbmp

PostPosted: Wed May 03, 2023 1:20 pm
by karinha
Silvio, este ejemplo, funciona bien:

Code: Select all  Expand view

   @ oBrw:nBottom + 2, oBrw:nWidth - 20 BTNBMP aBtnBrow[4] ;
      FLAT SIZE 30, 30  OF oTabella   PIXEL                ;
      COLOR  nRgb( 238, 236, 219 ), nRgb( 238, 236, 219 )  ;
      BITMAP "c:\fwh1905\bitmaps\EXIT.bmp" NOROUND         ;
      ACTION ::ShowPopUp( { |oBtn| MenuContextual( oBtn,oBrw,cPrefix + "Aux",cDbf,aGet ) } )


FUNCTION MenuContextual( oControl, oBrw, cIniEntry, cDbf, aGet )

   LOCAL oMenu

   MENU oMenu POPUP
   MENUITEM "Seleziona la linea corrente" ;
      ACTION  NIL

   MENUITEM "Seleziona tutto"

   MENUITEM "Esporta" Action NIL

   MENUITEM "Colonne" ACTION ( SelectColumns( oBrw ), ;
      ChangeBrowse( oBrw, aGet ) )

   ENDMENU

RETURN oMenu
 


Regards, saludos.

Re: also the error end on tbtnbmp

PostPosted: Wed May 03, 2023 2:18 pm
by Silvio.Falconi
Also my source run ok