Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More Thoughts on Assign and Access (VFP6)
Message
From
14/07/1998 12:23:05
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
More Thoughts on Assign and Access (VFP6)
Miscellaneous
Thread ID:
00117203
Message ID:
00117203
Views:
53
With prior versions of VFP, you could hide properties in, lets say, an Application object and call only methods if you wanted to. With VFP6 and Access and Assign you can do the total opposite.

The VFP documentation, in describing the benefits of Access and Assign, states:

"You can create a public interface for a class or object that separates the interface from the implementation"

This is true and cool. For example, if you wanted an opentable method in your App object, you could add a custom property ("OpenTable") and a custom method ("OpenTable_Assign").

From elsewhere, you would just set the property: oApp.OpenTable="mytable"

The OpenTable_Assign code would be:
LPARAMETERS vNewVal
IF TYPE("vNewVal") = "C"
   USE (vNewVal)
ENDIF
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Next
Reply
Map
View

Click here to load this message in the networking platform