Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DO FORM MyForm TO uResult--Undefined Variable
Message
De
15/09/1999 03:30:54
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00264264
Message ID:
00264830
Vues:
24
>Hi all:
>
>>Unload event fires but form is not initialized. So you get no return value.
>
>Thanks for all the responses.
>
>Since the form dos not completely get initilized when a .F. is returned in the Init, it makes sense that the TO uResult would not get updated. I came up with another clumsy work around--setting a timer to release the form. That way I can get my return value passed back to uResult. I just need to figure a way to not show the flashing form.
>
>--Paul


Paul,
The code I sent works pretty well and no screen flash (no init). There I used 100 as a default return value (no init case). Make it say -1 or 0.
Being honest this is not the way I use for passing parameters and getting return values. Instead I pass calling forms reference to other form and make called modeless or modal to my taste. The called form then could access the caller's PEM.
* Caller form - consider it has some custom properties
thisform.cCustom = "noinit"
do form frmCalled with thisform
* If modeless
* do form frmCalled with thisform name "myCalledForm"
* so caller also could access called's PEM

*Called form - has a property oCaller holding caller's reference
* init
lparameters toForm
with this
 .oCaller = toForm
*....
* If lCannotInit
* return .f.
* else
* .oCaller.cCustom = "inited"
* endif
endwith

* Any method, event of any control could do these
with thisform.oCaller
 .dSelectedDate = dSomeDate     && Modify properties in caller
 .txtCustomerName.value = "John Smith"
 .myGrid.clmCountry.Text1.value = "Turkey"
 .GetCustomerData()             && Call a method of caller
 .refresh()                     && Refresh caller
 .RemoveObject("SomeControl")   
 .Show()                        && Make it active one
endwith
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform