Bug in TBar

Post Reply
User avatar
Enrico Maria Giordano
Posts: 8734
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Been thanked: 1 time
Contact:

Bug in TBar

Post by Enrico Maria Giordano »

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

#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: 8734
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Been thanked: 1 time
Contact:

Re: Bug in TBar

Post by Enrico Maria Giordano »

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

Code: Select all | Expand

  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
Antonio Linares
Site Admin
Posts: 42398
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 10 times
Been thanked: 47 times
Contact:

Re: Bug in TBar

Post by Antonio Linares »

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
Enrico Maria Giordano
Posts: 8734
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Been thanked: 1 time
Contact:

Re: Bug in TBar

Post by Enrico Maria Giordano »

Antonio,

but it's no backward compatible. :-(

EMG
User avatar
Antonio Linares
Site Admin
Posts: 42398
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 10 times
Been thanked: 47 times
Contact:

Re: Bug in TBar

Post by Antonio Linares »

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
Enrico Maria Giordano
Posts: 8734
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Been thanked: 1 time
Contact:

Re: Bug in TBar

Post by Enrico Maria Giordano »

Antonio,

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

EMG
User avatar
Antonio Linares
Site Admin
Posts: 42398
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 10 times
Been thanked: 47 times
Contact:

Re: Bug in TBar

Post by Antonio Linares »

Enrico,

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

Antonio Linares
www.fivetechsoft.com
Post Reply