Page 1 of 1

Bug in latest FWH

Posted: Mon Nov 27, 2006 3:16 pm
by Enrico Maria Giordano
The following sample bombs out with an error:

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oWnd, oBar

    DEFINE WINDOW oWnd

    DEFINE BUTTONBAR oBar OF oWnd 3D

    DEFINE BUTTON;
           OF oBar;
           FILE "C:\FWH\BITMAPS\16x16\close.bmp";
           ACTION oWnd:End();
           TOOLTIP "Close"

    ACTIVATE WINDOW oWnd

    RETURN NIL
This is the error:
Error BASE/1066 Argument error: conditional
This is the call stack:
Stack Calls
===========
Called from: BTNBMP.PRG => TBTNBMP:PAINT(0)
Called from: BTNBMP.PRG => (b)TBTNBMP:TBTNBMP(0)
Called from: BTNBMP.PRG => TBTNBMP:DISPLAY(0)
Called from: CONTROL.PRG => TBTNBMP:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => UPDATEWINDOW(0)
Called from: WINDOW.PRG => TWINDOW:ACTIVATE(0)
Called from: BUG3.prg => MAIN(18)
EMG

Posted: Mon Nov 27, 2006 6:16 pm
by Marc Boissinot
Enrico,

Your sample works fine for me...
fwh 2.8 + xHarbour builder oct. 2006

Posted: Mon Nov 27, 2006 6:23 pm
by Enrico Maria Giordano
Yes, I know it was working fine with Oct 2006 build. The bug is in the latest, Nov 2006.

EMG

Posted: Tue Nov 28, 2006 8:16 am
by Antonio Linares
Enrico,

Please add this line:

METHOD Paint() CLASS TBtnBmp

...

DEFAULT ::lTransparent := .f. //this!

Posted: Tue Nov 28, 2006 8:25 am
by Enrico Maria Giordano
Antonio, I just found that if I copy/paste TBtnBmp class inside my sample PRG then it works fine without any changes. It seems that the source code is different from what it is in the LIB.

EMG

Posted: Tue Nov 28, 2006 8:39 am
by Enrico Maria Giordano
Ok, it seems that your fix did the trick anyway.

EMG

Posted: Tue Nov 28, 2006 8:47 am
by Antonio Linares
Enrico,

Yes, you are right. Somehow the latest Class TBtnBmp didn't go into the LIB. We are going to publish the FWH build again. Thanks,

Posted: Tue Nov 28, 2006 8:49 am
by Enrico Maria Giordano
Thank you!

EMG