FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Combo box with data object
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Combo box with data object
Posted: Sat Jun 30, 2007 12:31 AM

The following code:

REDEFINE COMBOBOX oMake VAR cvMake ITEMS aMake ;
ON CHANGE ( aModel := SetVehModel( aModel, cvMake ), oModel:setItems( aModel ), oDvm:update( ), .T. );
ID 893 OF oDvm MESSAGE "Enter the make of the vehicle" UPDATE

REDEFINE COMBOBOX oModel VAR oUnt:vehmod ITEMS aModel ;
ID 442 OF oDvm MESSAGE "Select the proper model" UPDATE

now has a problem. The idea is when a make is selected in the first combobox, the array of models specific to that make is reset. That all works fine. However, the variable from the database, oUnt:vehmod, does not display. Essentially, browsing dow a file should display both the make and model in the dialog box, but only the make is shown. This is a relatively new behavior ( latest FWH update ). If I remove the oModel VAR it will show but then the aModel array does not get updated properly.

Your ideas would be appreciated.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Combo box with data object
Posted: Mon Jul 02, 2007 05:17 PM

Tim,

I suggest comparing the combobox classes from the two versions using a file compare utility. This should help you find the changes and thus narrow down the problem.

I use WinMerge (www.winmerge.org). It is freeware.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Combobox
Posted: Tue Jul 03, 2007 04:41 PM

The error was unrelated to the combobox code. On the On Change, it had to do with the sequence the data was applied. When I changed the sequence of the steps in the process it worked. I'm not exactly sure why because logically the original order seemed correct, but it works now.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Combo box with data object
Posted: Tue Jul 03, 2007 06:53 PM

Tim,

OK, glad to hear you have solved it.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion