Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Properties
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00189168
Message ID:
00189739
Views:
9
>Just an observation:
>If I understand correctly, if the Assign method affects other objects, it could prove to be a tricky bug to find for someone who is not aware of the method.
>
>I do have a question:
>The example you gave,
>ThisForm.BackColor = "RED"
>would produce an error in VFP 3.0 (improper data type or something). Would the Assign method intercept the assignment command and actually override what it does and therefore avoid the error?
>
>Also, does every propery of every object have Assign and Access methods?
>

Joe,

If a developer uses an assign emthod then that developer should be aware of how they work. Assign and access methods are optional in VFP 6.0. You can have them or not as you choose.

An assign method receives the value being assigned as a parameter and you can do whatever you want with it. Yes, the code would cause an error in 3.0 cuz 3.0 doesn't have assign method support, neither does 5.0.

You can create access and assign methods for any property you choose, your own custom ones and the one that are part of the VFP base classes.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform