I create a browse ( perhaps with an array ), with headers and columns.
If the first field is String but the content is numbers, it is somehow converting it to a decimal after perhaps 5 characters where it adds a period instead of the next character. It also can truncate the remaining data. I also see the strange truncating and improper sizing on other fields.
Sizing of the fields was not accurate so I then specified the SIZE for each field in the command. Even so the decimal was still in place.
I found it necessary to also add a PICTURE field to get it properly formatted.
Here is an example of a BROWSE that finally worked properly.
Code: Select all
// Display the browse
REDEFINE XBROWSE oLbx2 ;
DATASOURCE oListOrders ;
HEADERS " Order ", " Vendor ", " Date ", " " ;
COLUMNS "ordnum", "ordcom", "orddat", " " ;
SIZES 150, 300, 100 ;
PICTURE "#####", "@!", "99/99/99";
ID 2100 OF oDlt ;
ON DBLCLICK (retval := .t., oDlt:end() ) ;
MESSAGE "Type the beginning of the vendor, highlight the desired order, and Double Click, or select Accept" ;
AUTOSORT UPDATE
ORDNUM is a Character field of 10 characters
ORDCOM is a Character field of about 30 characters. Without the picture statement, a value like "Advantage Fuel Storage and Delivery" would display as "Adfvan.very"
ORDDAT is a Date field.
I have handled the problem ( but not fixed the flaw that causes it ) but wonder if anyone else has seen similar behaviors. Also, it does not occur with every instance of Xbrowse ...
A SECOND PROBLEM I am seeing, which was corrected previously, occurs with clicking on a row. In these same browses, if I have a list of 10 items, perhaps the last 3 or 4 will not respond to mouse clicks. However, if I use the arrow key to scroll down to them, they highlight fine. Thoughts on this would be appreciated. Again, it is not consistent across all uses of XBrowse.
Tim