Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Browse preference doesn't work - why not?
Message
 
À
24/06/1998 01:00:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00111116
Message ID:
00111345
Vues:
20
Keith,
Thanks to your tip, I have a chance to retain my hair into my old age. It was going fast <g>.

The documentation really stinks with regard to how to make Browse preference work. Your tip really got me going in the right direction.

Thanks again.
Ed


>I encountered this bug a few years back. If I remember correctly, the following is true.
>
>When you've got calculated fields, they all shift to the end behind uncalculated fields when you exit and then re-execute a browse with a preference. There were two ways I found to get around the problem.
>
>1. Order the fields on the first go around and then compile the Foxuser into your app. But this kind of negates the functionality.{s}
>
>2. Make *all* of your fields calculated (ie. dg_cnum=dg_cnum, price=price). I believe that should do it for you.
>
>>Using FPW 2.6a under Win95, I can't seem to get BROWSE PREFERENCE to work.
>>Here's the BROWSE statement:
>>   BROWSE PREFERENCE BROWDEAL ;
>>   FIELDS ;
>>     DG_CNUM :H='Contract #',;
>>     COMMDITY=IIF(!EMPTY(COMMODITY) AND
>>SEEK('POS'+LEFT(COMMODITY,2),'CODES'), ;
>>      CODES.CVAL,'') :H='Commodity' :15, ;
>>     WEIGHT ,;
>>     SELLER=IIF(SEEK(DG_SLRNUM,'CUSTS'),CUSTS.SHORTNAME,'') ;
>>      :12 :H='Seller', ;
>>     BUYER=IIF(SEEK(DG_BYRNUM,'CUSTS'),CUSTS.SHORTNAME,'') ;
>>      :12 :H='Buyer', ;
>>     SHDT=SUBSTR(DTOS(SHIP_DATE),5,2)+'/'+LEFT(DTOS(SHIP_DATE),4) :H='Ship
>>Month',;
>>     PRICE, ;
>>     CTRDT=DG_DATE :H='Contract Date' ;
>>    WINDOW VDEALS ;
>>    REST NODELETE NOEDIT NOAPPEND &FONTSTYLE
>>
>>My understanding of the way PREFERENCE is supposed to work is that the user
>>can change column widths and the order of columns in the browse, and these
>>changes will be preserved in the preference record in the resource file.
>>The next time the user executes the browse, the browse should open with
>>field widths and column order as they were when the browse window was last
>>closed with CTRL-W.  This does not appear to be the case with this BROWSE
>>statement.
>>
>>RESOURCE is ON, and I see the preference record in the resource file.  The
>>resource file is not write protected, and the READONLY field is .F.  Each
>>user has their own resource file.
>>
>>It appears that user changes to column widths and/or column orders are
>>preserved once in a blue moon, and randomly, at that.  I was able to click
>>and drag to move the PRICE column to be the second column from the left, and
>>that stuck so hard I couldn't move it anywhere else at all.  I'd click and
>>drag to move it to a different column position (which it did), but after I
>>closed the Browse window with CTRL-W and re-executed the browse, the PRICE
>>column was back in the second-from-the-left column position.  Deleting the
>>preference record from the resource file had no effect, until I packed the
>>resource file and really got rid of it.  Only then did the PRICE column move
>>back to second-from-the-right, as defined in the browse statement above.
>>
>>Am I incorrect in my assumption about how BROWSE PREFERENCE works?
>>
>>What can I do to give my end users the ability to set the field widths and
>>column order in the above browse, and have their setting preserved so that
>>subsequent times they execute the browse, the browse window opens with the
>>field widths and column order from their previous execution of that browse?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform