Bug in TBtnBmp?

Bug in TBtnBmp?

Postby Enrico Maria Giordano » Sun Aug 04, 2013 9:30 pm

In the sample below, please click on the "Test" button and you will see the BtnBmp doesn't go away (while if you try with the Bitmap all is fine).

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    LOCAL oCtl

    DEFINE DIALOG oDlg;
           SIZE 800, 600

//    @ 1, 1 BITMAP oCtl
    @ 1, 1 BTNBMP oCtl

    @ 7, 1 BUTTON "Test";
           ACTION oCtl:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TBtnBmp?

Postby FranciscoA » Mon Aug 05, 2013 2:04 am

Enrico,
Yes, it seems.
Code: Select all  Expand view
   LOCAL oDlg

    LOCAL oCtl

    LOCAL cVar := "Hola"
    LOCAL nVar := 1
    LOCAL lVar := .t.

    DEFINE DIALOG oDlg;
           SIZE 800, 600

//    @ 1, 1 BITMAP oCtl    //yes
    @ 1, 1 BTNBMP oCtl PROMPT "BtnBmp" SIZE 60,14 //NO
//    @ 1, 1 BUTTON oCtl PROMPT "Button"   //yes
//    @ 1, 1 SAY    oCtl PROMPT "HOLA"    //yes
//    @ 1, 1 CHECKBOX  oCtl VAR lVar      //yes
//    @ 1, 1 RADIO oCtl VAR nVar ITEMS "&One", "&Two" SIZE 150, 25  //yes
//    @ 1, 1 GET oCtl VAR cVAR SIZE 40,12  //yes
//    @ 1, 1 COMBOBOX oCtl VAR nVar ITEMS {"1","2","3"}   //yes


    @ 7, 1 BUTTON "Test";
           ACTION oCtl:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2158
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: Bug in TBtnBmp?

Postby Enrico Maria Giordano » Wed Aug 07, 2013 2:17 pm

Any ideas? I think the problem is inside Destroy() method.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TBtnBmp?

Postby karinha » Wed Aug 07, 2013 6:02 pm

Code: Select all  Expand view

#include "Fivewin.ch"

FUNCTION MAIN()

    LOCAL oDlg, oCtl

    DEFINE DIALOG oDlg SIZE 800, 600

    // @ 1, 1 BITMAP oCtl
    @ 1, 1 BTNBMP oCtl PROMPT "Visible"

    /* // error
    @ 7, 1 BUTTON "Test";
           ACTION oCtl:End()
    */


    // Invisible
    @ 7, 1 BUTTON "Hide";
           ACTION( oCtl:Hide() )

    // Visible
    @ 9, 1 BUTTON "Show";
           ACTION( oCtl:Show() )

    @ 11, 1 BUTTON "&Exit" ;
           ACTION( oDlg:End() ) CANCEL UPDATE

    ACTIVATE DIALOG oDlg CENTER

RETURN NIL
 
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7814
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Bug in TBtnBmp?

Postby Enrico Maria Giordano » Wed Aug 07, 2013 6:16 pm

João,

Thank you, but I'd want to End() it, not to just hide it.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TBtnBmp?

Postby karinha » Wed Aug 07, 2013 7:54 pm

Code: Select all  Expand view

#include "Fivewin.ch"

FUNCTION MAIN()

    LOCAL oDlg, oCtl

    DEFINE DIALOG oDlg SIZE 800, 600

    // @ 1, 1 BITMAP oCtl
    @ 1, 1 BTNBMP oCtl PROMPt "Visible"

    @ 3, 1 BUTTON "Test1";
           ACTION( oCtl:End(), oDlg:Refresh(), oDlg:UpDate() )

    @ 5, 1 BUTTON "Test2";
           ACTION( oCtl:Hide(), oCtl:End(), oDlg:Refresh(), oDlg:UpDate() )

    // Invisible
    @ 7, 1 BUTTON "Hide";
           ACTION( oCtl:Hide() )

    // Visible
    @ 9, 1 BUTTON "Show";
           ACTION( oCtl:Show() )

    @ 11, 1 BUTTON "&Exit" ;
           ACTION( oDlg:End() ) CANCEL UPDATE

    ACTIVATE DIALOG oDlg CENTER

RETURN NIL
 



João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7814
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Bug in TBtnBmp?

Postby Enrico Maria Giordano » Wed Aug 07, 2013 8:38 pm

João,

you missed the point: there is a problem in TBtmBmp Destroy() method that prevents the control to End(). It needs to be fixed.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 95 guests