Bug in SkinButtons()

Bug in SkinButtons()

Postby Enrico Maria Giordano » Sat Oct 03, 2009 8:52 pm

This is the sample showing the problem. Pressing "Test" button the other one lost the skin effect:

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


FUNCTION MAIN()

    LOCAL oDlg, oBtn

    SKINBUTTONS()

    DEFINE DIALOG oDlg

    @ 2, 2 BUTTON "&Test";
           ACTION ( oBtn:Disable(), oBtn:Enable() )

    @ 3, 2 BUTTON oBtn PROMPT "&Close";
           ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


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

Re: Bug in SkinButtons()

Postby Antonio Linares » Sat Oct 03, 2009 9:05 pm

Enrico,

It seems as there is a painting state that we are not controlling yet.

As a workaround you can do:
Code: Select all  Expand view

    @ 2, 2 BUTTON "&Test";
           ACTION ( oBtn:Disable(), oBtn:Enable(), oDlg:Refresh() )
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Bug in SkinButtons()

Postby Silvio » Sun Oct 04, 2009 8:27 am

Antonio ,

there is another error

when I click on test button ( I click on many tries) the obtn is disable but then I CANNOT CLOSE THE DIALOG !!!!!

I try to click on "X" but it not run ok

the error not run when I click one on test button

to create the error you must click on test button many tries

then If you wait some seconds you can close the dialog
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Re: Bug in SkinButtons()

Postby Antonio Linares » Fri Dec 04, 2009 9:21 pm

Not yet :-(
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Bug in SkinButtons()

Postby Enrico Maria Giordano » Sat Dec 05, 2009 12:16 pm

No problem, my friend. It's only a pity that such a wonderful option can't be used yet.

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

Re: Bug in SkinButtons()

Postby MarcoBoschi » Mon Dec 07, 2009 10:20 am

Just a question:
from the practical point of view which is the way to enable and disable the button?

@ 2, 2 BUTTON "&Test";
ACTION ( oBtn:Disable(), oBtn:Enable() )

...excuse me dear friends but I do not understand the problem.
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Bug in SkinButtons()

Postby Antonio Linares » Mon Dec 07, 2009 10:30 am

Marco,

To disable a button, or any window, dialog or control, we use oControl:Disable() only.

In this case Enrico found that when calling to both oBtn:Disable(), oBtn:Enable() then the used skin is not applied.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Bug in SkinButtons()

Postby MarcoBoschi » Mon Dec 07, 2009 10:39 am

Antonio,
is this the case:

1) disable button
2) call to several functions
3) enable button again


Is that correct? is this the case?
Bye
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Bug in SkinButtons()

Postby Antonio Linares » Mon Dec 07, 2009 10:46 am

Marco,

Yes, that should work fine.

The problem is only when doing the two consecutive calls
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Bug in SkinButtons()

Postby Enrico Maria Giordano » Mon Dec 07, 2009 1:12 pm

No, the problem is when any function is called in between too:

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


FUNCTION MAIN()

    LOCAL oDlg, oBtn

    SKINBUTTONS()

    DEFINE DIALOG oDlg

    @ 2, 2 BUTTON "&Test";
           ACTION ( oBtn:Disable(), TEST(), oBtn:Enable() )

    @ 3, 2 BUTTON oBtn PROMPT "&Close";
           ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


STATIC FUNCTION TEST()

    LOCAL oDlg

    DEFINE DIALOG oDlg

    @ 1, 2 BUTTON "&Close";
           ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


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

Re: Bug in SkinButtons()

Postby Antonio Linares » Mon Dec 07, 2009 3:12 pm

Enrico,

This reduced version from yours also fails in Windows 7:
Code: Select all  Expand view

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oBtn

    SKINBUTTONS()

    DEFINE DIALOG oDlg

    @ 2, 2 BUTTON "&Test";
           ACTION ( oBtn:Disable(), oBtn:Enable() )

    @ 3, 2 BUTTON oBtn PROMPT "&Close";
           ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

RETURN NIL
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Bug in SkinButtons()

Postby hua » Fri Apr 16, 2010 7:32 am

Is this bug present in 10.3 or has it been resolved?
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Bug in SkinButtons()

Postby Enrico Maria Giordano » Fri Apr 16, 2010 7:45 am

Unfortunately, It is still present. :-(

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

Re: Bug in SkinButtons()

Postby hua » Fri Apr 16, 2010 7:54 am

Thank you for the info Enrico
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], jmartial, Marc Venken and 109 guests