Bug in TBar

Bug in TBar

Postby Enrico Maria Giordano » 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: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8243
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TBar

Postby Enrico Maria Giordano » Sun May 03, 2015 8:12 am

The problem seems to be in TBar New() method:

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


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

Can you confirm?

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

Re: Bug in TBar

Postby Antonio Linares » Sun May 03, 2015 3: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41205
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Bug in TBar

Postby Enrico Maria Giordano » Sun May 03, 2015 5:14 pm

Antonio,

but it's no backward compatible. :-(

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

Re: Bug in TBar

Postby Antonio Linares » Sun May 03, 2015 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41205
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Bug in TBar

Postby Enrico Maria Giordano » Sun May 03, 2015 5:57 pm

Antonio,

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

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

Re: Bug in TBar

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 41205
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to Bugs report & fixes / Informe de errores y arreglos

Who is online

Users browsing this forum: No registered users and 2 guests