Combo box with data object

Combo box with data object

Postby TimStone » 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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Postby James Bott » Mon Jul 02, 2007 5: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Combobox

Postby TimStone » Tue Jul 03, 2007 4: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Postby James Bott » Tue Jul 03, 2007 6:53 pm

Tim,

OK, glad to hear you have solved it.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 79 guests