>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