Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing params (correct content)
Message
 
À
27/02/1998 06:09:08
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00081635
Message ID:
00081873
Vues:
28
>>Sawadee,
>>
>> I've tried passing params to a form by the book but I'm losing my way somehow. I'm trying to open a form from a control on another form. By doing DO FORM <> WITH p1, p2 and trying to catch them in the recieving form's Init, as the developer's guide outlines. But I get the error 'No PARAM statement in ...Click etc' The recieving form was built with the form wizard, so it is based on Form and has the wizstyle picbuttons attached to it. I want to instantiate this form in either Edit or New mode by telling it via the PARA. Somehow, the PARA statement in the Init of the launched form is not seen by the calling object's click event. Where have I gone wrong?
>>
>>Eric K.
>
>I think "Sawadee" is something like "hello, greetings..". Same to you. The form gets the parameters in init event (or in Load event if the form is a FP 2.x converted screen and windowtype prop 2 or 3) and those parameters are seen only in init (if not public). To make them visible in all form events and methods either assign them to public vars or to added custom form props.
>'No PARAM statement in ...Click etc' ?? Do you mean you call wizard buttons with params ? They don't have params.
>To instantiate it either in edit or new just pass it ass a param and click the appropriate button. As :
>
>..
>do form myForm with .t.  && ie: .t. for new
>
>* myForm.init         && Myform is built with wizard
>parameters lNewRecord
>if parameters() = 0
> lNewRecord = .f.
>endif
>if lNewRecord
>   thisform.picbtns1.cmdAdd.click
>else
>   thisform.picbtns1.cmdEdit.click
>endif
>
>Cetin

Sawadee Kaap, (How are you today?)

Actually, the param statement is in the formB Init, like the book says,
and in formA, the button ADD.Click contains DO FORM formB WITH p1, p2.

By the way, how do you pass a logical data type?

Eric Kleeman
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform