Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I never really thought much of property assign methods..
Message
From
13/07/1999 17:45:31
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00241039
Message ID:
00241047
Views:
12
Could I give one?
Let say you create custom property Thisform.KeyValue and use its Assign method to make all operations to 'refresh' a form. So now any time you really want to 'refresh' a form, e.g. from cmdNext/Prev click event, or just revisiting the form after search dialog, or after new record added, or after record has been edited: any time you just issue one line of code:
Thisform.Keyvalue=MasterTable.Primarykeyfield
and even if you are still on the same record everything will get refreshed.
Obviously, this example is not for 'dumb' Thisform.Refresh functionality, but in more complicated interface it works great. Personally, I've perceived 'Assign' method as the missing chain in my preferable way to develop, because I already used 'KeyValue' property in VFP5.

>Could you go into more detail with this example? I haven't found a use for access and assign methods yet.
>
>>I don't know whether this has already been covered but I found that a great place to put form behavior code is in the assign method for a property. I usually have a property called ladding on my forms to indicate that we are adding a record, I now put all my control (vcr buttons etc) display code in the assign method and test the status of the property within this method.
>>
>>Hope this may be of use to some.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform