Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Input disappears from field
Message
De
19/11/1998 09:53:35
Eric Barnett
Barnett Solutions Group, Inc
Sonoma, Californie, États-Unis
 
 
À
18/11/1998 23:42:59
Hermann Strijewski
Fast Track Business Solutions
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00159119
Message ID:
00159238
Vues:
22
Although I haven't worked with the VFP6.0 App Wizard (I have my own framework), it sounds like you are getting the notorious Toolbar doesn't set focus problem.

Basically, when you press the Toolbar button, the focus of the current control on the active form doesn't change. Therefore, the Valid of the control doesn't fire, and the value of the field to which the control is bound doesn't change.

Since VFP5.0 I have put code in my Save methods of my forms that use toolbars to something like the following:

IF _screen.activeform.activecontrol.baseclass="Textbox" .OR. ;
_screen.activeform.activecontrol.baseclass="Editbox"
clastedit=_screen.activeform.activecontrol.controlsource
IF !EMPTY(clastedit)
REPLACE &clastedit ;
WITH _screen.activeform.activecontrol.value
ENDIF
IF !EMPTY(_screen.activeform.activecontrol.readmethod("Valid"))
_screen.activeform.activecontrol.valid()
ENDIF
ENDIF

There are lots of additional issues with different types of controls, and especially grids (!!!). I'm surprised (if this is the problem) that the people who did the VFP6.0 App Wizard didn't deal with this problem since it is not new.

Try using the above code as the first thing that happens when you push the toolbar button and see if it helps with text boxes. If so I can send you a little more detailed information about different types of controls.

If not, then must be a different problem...

>I am programming an application using the FoxPRO 6.0 Application Wizard and its classes.
>
>Whenever I enter some changes in a field, leave the cursor in that field and then push the "Next Record" button in the framework provided toolbar, then the "Previous Button", the change in the field is GONE.
>
>Am I doing something wrong, or is this some known error in the VFP 6.0 framework?
>
>TIA!
>
>hs
Eric Shaneson
Cutting Edge Consulting
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform