Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Michael,
One of the best techniques I picked up from UT a long time ago
(Barbara Paltiel if I remember well) is to
pass an object reference as parameter. This way you can never go
wrong, or hardly ever.
Example : DO FORM NEXTFORM WITH This
Then, in NEXTFORM the first thing you do is store the object reference
you have been passed into a property of NEXTFORM, e.g. :
O_Calling_Control = Object_Reference_Passed (The THIS parameter of the DO FORM)
After that, within NEXTFORM, you can do anything you want, e.g.
This.Anything.Value = O_Calling_Control.Value
etc, etc,....
Michel.
================ Original Message follows =================
>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
Précédent
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