bug in FW 13.04 combobox

Re: bug in FW 13.04 combobox

Postby ADutheil » Tue May 07, 2013 7:54 pm

testcombo.prg not working the same way between 13.03 and 13.04. If you initialize cItem local cItem := "Testing" it is shown with 13.03 and not with 13.04.
Regards,

André Dutheil
FWH 13.04 + HB 3.2 + MSVS 10
ADutheil
 
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: bug in FW 13.04 combobox

Postby Antonio Linares » Tue May 07, 2013 8:31 pm

André,

I email you the fixed library :-)
regards, saludos

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

Re: bug in FW 13.04 combobox

Postby ADutheil » Tue May 07, 2013 8:40 pm

Ok now working with BCC582. Can you send me the libs for msvc10 or better teach how to remove and add a prg from the libs like in the old days lib -+ ...
Last edited by ADutheil on Wed May 08, 2013 9:32 am, edited 1 time in total.
Regards,

André Dutheil
FWH 13.04 + HB 3.2 + MSVS 10
ADutheil
 
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: bug in FW 13.04 combobox

Postby Mulyadi » Wed May 08, 2013 2:53 am

Antonio...

I have same problem. Advisable your posting the fix here..
but in my case, in RC file I must be change all combobox elements..
is so very very very very very back breaking....:(
TQ.


Mulyadi
User avatar
Mulyadi
 
Posts: 82
Joined: Mon Apr 18, 2011 2:32 am

Re: bug in FW 13.04 combobox

Postby byte-one » Wed May 08, 2013 8:33 am

Antonio, in my code it is beeing enough to write directly in the code "REDEFINE COMBOBOX....STYLE CBS_DROPDOWN". The RC-file must not be changed.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: bug in FW 13.04 combobox

Postby Antonio Linares » Wed May 08, 2013 10:08 am

André,

This is how I manage the libraries with Microsoft:

set VCDIR="%ProgramFiles%\Microsoft Visual Studio 10.0\VC"

%VCDIR%\bin\Lib Fivehc32.lib /OUT:Fivehc32.lib module.obj
regards, saludos

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

Re: bug in FW 13.04 combobox

Postby Antonio Linares » Wed May 08, 2013 10:09 am

Mulyadi,

have you tested the fix that I have published above ?

If keeps failing, could you please post a portion of your RC where you use the comboboxes and what you have to change ? thanks
regards, saludos

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

Re: bug in FW 13.04 combobox

Postby Antonio Linares » Wed May 08, 2013 10:11 am

Günther,

FWH COMBOBOX command also supports that clause :-)

Could you please show an example of what is failing with current combobox implementation ? Here is fine on our tests, thanks
regards, saludos

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

Re: bug in FW 13.04 combobox

Postby ADutheil » Wed May 08, 2013 11:26 am

Antonio,

I just perceived I don´t have the new combobox.prg. Can you mail it please?
Regards,

André Dutheil
FWH 13.04 + HB 3.2 + MSVS 10
ADutheil
 
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: bug in FW 13.04 combobox

Postby Antonio Linares » Wed May 08, 2013 11:31 am

Already sent :-)
regards, saludos

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

Re: bug in FW 13.04 combobox

Postby byte-one » Wed May 08, 2013 11:32 am

Antonio, now the reaction seems to be OK! :D

Additional i had moved the creation from the ::oGet and ::oGet:bLostFocus and ::oGet:bKeyChar in ::initiate(). So this code are required only once. (not separate in ::new() and ::redefine() ) -> see code down
Only the function in ::GetKeyChar( nKey ) to seek in the list are not optimal. When no item found, strange things are to see. (double chars, ...)

Code: Select all  Expand view
METHOD Initiate( hDlg ) CLASS TComboBox

   ::Super:Initiate( hDlg )

   ::Default()

   if nAnd( GetWindowLong( ::hWnd, GWL_STYLE ), CBS_DROPDOWNLIST ) == CBS_DROPDOWN
      ::oGet := TGet():ReDefine( nil,    ;  // ID not used
                              ::bSetGet, ;  // bSETGET(uVar)
                              Self,      ;  // oDlg
                              ::nHelpID, ;  // Help Context ID
                              ::cPict,     ;  // Picture
                              nil,       ;  // Valid is handled by the CBx
                              ::nClrText,;
                              ::nClrPane,;
                              ::oFont,   ;  // <oFont>
                              nil,       ;  // <oCursor>
                              ::cMsg,      ;  // cMsg
                              nil,       ;  // <.update.>
                              nil,       ;  // <{uWhen}>
                              ::bEChange,  ;  // {|nKey,nFlags,Self| <uEChange>}
                              .F.        )  // <.readonly.> )

      ::oGet:hWnd = GetWindow( ::hWnd, GW_CHILD )
      ::oGet:Link()
      ::oGet:bLostFocus = ;
      {| hCtlFocus, nAt, cItem| cItem := GetWindowText( ::hWnd ), ;
      nAt := ::SendMsg( CB_FINDSTRING, 0, Trim( cItem )) + 1,;
      Eval( ::bSetGet, cItem ),;
      ::Select( nAt ),;
      SetWindowText( ::hWnd, cItem ),;
      If( ::bValid != nil .and. ;
      GetParent( hCtlFocus ) == GetParent( ::hWnd ),;
      If( ! Eval( ::bValid, ::oGet, Self ),;
      ::PostMsg( WM_SETFOCUS ),),) }

      ::oGet:bKeyChar = { | nKey | ::GetKeyChar( nKey ) }
    endif
   ::Refresh()
return nil
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: bug in FW 13.04 combobox

Postby Antonio Linares » Wed May 08, 2013 11:34 am

Günther,

Additional i had moved the creation from the ::oGet and ::oGet:bLostFocus and ::oGet:bKeyChar in ::initiate()


We can't do that or we break existing legacy code, like this:

REDEFINE COMBOBOX oCbx ...

oCbx:oGet:... = ... // Your changes will error here!

ACTIVATE DIALOG oDlg
regards, saludos

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

Re: bug in FW 13.04 combobox

Postby byte-one » Wed May 08, 2013 11:46 am

Ok Antonio. General: On what moment the ::initiate() from the controls are called and from what code?
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: bug in FW 13.04 combobox

Postby Antonio Linares » Wed May 08, 2013 12:08 pm

Günther,

Method Initiate() is invoked in response to Windows WM_INITDIALOG message:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms645428(v=vs.85).aspx

So it is executed from ACTIVATE DIALOG but _before_ the dialog is shown :-)

Sent to the dialog box procedure immediately before a dialog box is displayed
regards, saludos

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

Re: bug in FW 13.04 combobox

Postby byte-one » Wed May 08, 2013 12:24 pm

Antonio, thanks!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], karinha, nageswaragunupudi and 112 guests