Page 1 of 1

RBTN No exported method: END Error

Posted: Thu Feb 04, 2021 12:23 am
by betoncu
My customers reported that they are getting the error below, when they click on one of the RBTNs.
This error does not occur always, but sometimes. The error and the source is below.

Please help. Thanks in advance.

Code: Select all

   @ 24,330 RBBTN oBtnPrn OF oToolBar2 POPUP FONT oFont2 TRANSPARENT BORDER ;
            SIZE 100,38 ;
            PROMPT "Yazıcı" ;
            MENU {|| MenuPop(oZEYIL, oTAKGEN, oPOLICE, cBrkod, cBradi, cDbadi)} ;
            BITMAP "BTN_PRINTER4" LEFT ;
            WHEN !Empty(oZEYIL:polno) .AND. PrintOK(oZEYIL, oPOLICE, oBtnOny, nZeyilTOP-nOdenenTOP)

Error description: Error BASE/1004 No exported method: END
Args:
[ 1] = U

Stack Calls
===========
Called from: => END( 0 )
Called from: .\source\classes\TRBTN.PRG => TRBTN:LBUTTONUP( 886 )
Called from: .\source\classes\TRBTN.PRG => TRBTN:LBUTTONDOWN( 799 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1788 )
Called from: .\source\classes\TRBTN.PRG => TRBTN:HANDLEEVENT( 1575 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3546 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1078 )
Called from: KAYNAK\SIGORTA.PRG => MAIN( 94 )

Re: RBTN No exported method: END Error

Posted: Thu Feb 04, 2021 8:01 am
by Antonio Linares
Birol,

Please try with:

MENU MenuPop(oZEYIL, oTAKGEN, oPOLICE, cBrkod, cBradi, cDbadi)

instead of:

MENU {|| MenuPop(oZEYIL, oTAKGEN, oPOLICE, cBrkod, cBradi, cDbadi)}

Re: RBTN No exported method: END Error

Posted: Thu Feb 04, 2021 5:54 pm
by betoncu
Ok. I will try.
Thanks

Re: RBTN No exported method: END Error

Posted: Thu Feb 04, 2021 6:16 pm
by betoncu
It does not work. Because there are some IF and WHEN conditions in my MenuPop Function and theese conditions are not executed.

Code: Select all

STATIC FUNCTION MenuPop(oZEYIL, oTAKGEN, oPOLICE, cBrkod, cBradi, cDbadi)
LOCAL oPopup

   MENU oPopup POPUP 2007
   
      MENUITEM "Poliçe/Zeyil" ACTION ZeyPrn(oZEYIL,oPOLICE,cBrkod,'T') WHEN !Empty(oZEYIL:onysahip)

      IF oZEYIL:brkod == '15'
         MENUITEM "Sertifika" ACTION SerPrn(oZEYIL,oPOLICE) WHEN !Empty(oZEYIL:onysahip)
      ENDIF

      MENUITEM "İptal İhbarı" ACTION IptIhb(oPOLICE,oZEYIL)
      .
      .
      .
   ENDMENU
   
RETURN oPopup