Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record bound to fields in form
Message
 
À
10/01/2000 19:56:04
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00315862
Message ID:
00315964
Vues:
27
The weirdest thing, right after I posted my question about the form not
displaying the correct record,.... I went back, launched VFP5
ran the form again, and it seemed to work just find.

So I created a second form, with a data environment, one free table,
opentables and closetables set to false, no buffering, no load data
on init. I dragged and dropped the fields from the data environment
onto the form. Then I said DO FORM PRICELIST from a command
button in my other form, with the cursor positioned to the proper
record in the pricelist table, and that form ALSO worked correctly.

So I dont know why it wasnt working before.

I must say, I find all the various settings confusing. I didnt ask
for a private datasession, reasoning that it is a single user app,
and I want the second form to "see" the open table cursor exactly
as the parent form had left it. I set to false anything to do with
opening tables, closing tables, in the data environment, reasoning
that I want the second form to leave the gosh-damn table ALONE, dont
do ANYTHING to it, just display the bound fields. And I set the
load data on initialization thingamajiggy to false, reasoning that
the fields should just display the data that the cursor is positioned
to.

A THISFORM.REFRESH does make sense to me, but it did not seem to be
necessary.

I realize there are many different ways to accomplish what I was
attempting with this, but I just felt like understand how all these
various data environment/form settings and bound controls work.

The same learning desire was the case for my earlier post regarding
how to pass a custom property from a parent form to a child form,
and receive it back changed by the user. Someone from another VFP list
serve told me that was an awkward way to do things, passing properties
between forms, but certainly that knowledge of how to do it must
be useful under certain circumstances. Of course, the within 30
minutes, I got 3 good how-to answers from UT, basically to
DO CHILDFORM with THISFORM, and then in the INIT of the childform,
a parameter variable loParentForm is now available to access any
of the parent form's properties, as well as to pass back altered
property values to the parent form during queryunload.

AND FOR THE FIRST TIME, in that loparentform = NULL, I learned something
concrete about the fix for those C500000 problems.

I was instructed to carefully clean-up by saying loParentForm = NULL
(I am guessing that is the reasoning for immediately assigning NULL
to an object after you are finished with it). Am I correct? Is this
NULLing of objects the bottom line to fixing C5 errors in VFP6 apps?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform