Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TABLEUPDATE(.T.) bombs with uncommitted changes
Message
 
 
À
02/10/2003 05:07:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00833421
Message ID:
00834363
Vues:
31
Peter,

> every every form's got it's own oToolBar

Since you have a one-to-one relationship between your forms and toolbars, you could explicitly hook them together with bidirectional object refs. Your form already has one to the toolbar, so just add one from the toolbar back to the form:

this.oToolbar = createobject( ..., thisform )

*toolbar.Init( roForm )
this.oForm = roForm

now your toolbar can make callbacks to form methods. One button's click might be:

this.parent.SaveForm()

* toolbar.SaveForm
this.oForm.SaveForm()

* toolbar.Clear
this.oForm = .null. && clear the form pointer

You have to make sure you clear these object references during the form.Destroy:

this.oToolbar.Clear()

But in general this might get you around your _screen.ActiveForm.ActiveControl issues. Because your SaveForm method can generically make sure that the last control has committed its changes to its ControSource.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform