Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another Cheezy Tip of the Week (VFP6)
Message
De
13/07/1998 20:01:43
 
 
À
13/07/1998 16:27:06
Jeroen Naus
Harte-Hanks Europe
Hasselt, Belgique
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00116665
Message ID:
00116987
Vues:
15
>In VFP 5.0 you could have easily done this by adding a method to your form called setstate or something. VFP 6.0 has a method no you can use for this which is great. Another great example they shoed at devcon is that you can easily pass different datatypes. Example: Form.color = "Red" and then in the assign method you could do something like.
>LPARAMETER value
>IF TYPE("value") = "C"
> DO CASE
> CASE value = "RED"
> value = RGB(...,...,...)
> CASE value = "GREEN"
> value = RGB(...,...,...)
> ENDCASE
>ENDIF

This isn't the same as Access and Assign. For example, in VFP 5.0:

* Form.Init
ThisForm.Caption = "My Form"

* Some button.click. Will always display "My Form"
WAIT WINDOW (ThisForm.Caption) && Displays "My Form"


In VFP 6.0, I can have it return anything I want. Example:

* Form.Init
ThisForm.Caption = "My Form"

* Form.Caption_Access
RETURN ("Hey...You can see the caption...you don't need to display it again"

* Some button.click. Will not return "My Form"
WAIT WINDOW (ThisForm.Caption) && Displays "Hey...You can see..."

I don't need another funtion to do this. It is automatic.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform