Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to change a property to a form from within a PRG fil
Message
 
À
07/02/1997 08:49:32
Alex Zhadanov
Computer Generated Solutions
New York City, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00019515
Message ID:
00019578
Vues:
36
>>Hi guys,
>>Is there a way to change a property of a form from within a PRG file, lets say that I call a program from
>>the init method of my_form, and in that program I want to change my_form.my_property, how can I do that?
>>
>>I tried:
>>DO FORM my_form NAME my_form LINKED
>>and then in the init event of my_form:
>>
>>DO my_prg WITH THISFORM.name
>>
>>and when I try to change the property in my_prg
>>
>>FUNCTION my_prg
>>PARAMETER form_name
>>LOCAL property_name
>>property_name=m.form_name+".my_property"
>>STORE "Hello" to &property_name
>>
>>I receive the error "My_form" is not an object.
>>Any suggestions?
>>
>>=THIS.thanks("in advance")
>
>Hi Luis.
>You should pass parameter to program like this :
>DO my_prg WITH THISFORM.
>In your case you are passing only object name not object itself.
>I hope this will help you
>Alex

Don't forget to change the PARAMETERS line for LPARAMETERS
in your fonction if your pass a reference to the object may be it will not make error now but it's better to not take a chance for the futur...

Rock
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform