FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index Bugs report & fixes / Informe de errores y arreglos Bug in TBar
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Bug in TBar
Posted: Fri May 01, 2015 11:53 AM
In the following sample, if you click on the window you will get TBAR. With the previous FWH release you got TSAY.

Code (fw): Select all Collapse
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oWnd

    DEFINE WINDOW oWnd

    DEFINE BUTTONBAR OF oWnd

    @ 10, 10 SAY "This is a test"

    ACTIVATE WINDOW oWnd;
             ON CLICK MSGINFO( oWnd:aControls[ 1 ]:ClassName )

    RETURN NIL


EMG
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Bug in TBar
Posted: Sun May 03, 2015 08:12 AM
The problem seems to be in TBar New() method:

Code (fw): Select all Collapse
   if ! Empty( oWnd:hWnd )
      ::Create()
      ::GetFont()
//      oWnd:AddControl( Self )
   else


Commenting out oWnd:AddControl( Self ) seems to fix it.

Can you confirm?

EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Bug in TBar
Posted: Sun May 03, 2015 03:22 PM
Enrico,

In the following sample, if you click on the window you will get TBAR. With the previous FWH release you got TSAY.


That seems to be correct now. TBar is another control of the window and as it has to be created the first one
thats why it appears as the first control.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Bug in TBar
Posted: Sun May 03, 2015 05:14 PM

Antonio,

but it's no backward compatible. :-(

EMG

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Bug in TBar
Posted: Sun May 03, 2015 05:37 PM

We should not keep a bug backwards compatible :-)

Does it means many changes in your app ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Bug in TBar
Posted: Sun May 03, 2015 05:57 PM

Antonio,

probably not. But that behavior was there from the beginnings of FW. :-)

EMG

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Bug in TBar
Posted: Sun May 03, 2015 10:08 PM

Enrico,

Yes, you are right, but with recent TBar changes this was needed to be implemented

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion