Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
How do i reference a spawned form? - VFP6, SP3
I have an application where I need to do the following:
There is a grid on the form. If a user double clicks a particular cell, I would like to show a small detail form off to one side.
In the doubleclick event of the cell, I have a line that says
do clkview with this.value, where clkview is the form I want to spawn.
Now needless to say, if it exists, the form should be updatable by passing the value to the property on the clkview form that stores the value passed.
Therefore I thought I could reference the form with
clkview.value=this.value
clkv.refreshit
Where value = stored value, and refreshit= routine to requery and refresh it.
However what happens, is the object reference does not get created and I cannot reference it this and it spawns another form when the user doulbeclicks. Needless to say this is confussing having all of these windows open, when only one is valid.
The actual doubleclick code snippet is below:
if type('clkview')=='O' and clkview!=.null.
clkview.tclock=this.value
clkview.viewrefresh
clkview.activate
else
do form clkview with this.value
endif
What am I missing?
TIA,
Mike
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement